issue with switch camera flashphoner in react

Max

Administrator
Staff member
from this line ( await Flashphoner.getMediaAccess(this.getConstraints(), localVideo); ) code not working.
on page load time.
Please check if localVideo is already defined and getContstraints returns a valid constraints object when Flashphoner.getMediaAccess() is called.
Seems like you need a more experienced frontend developer to debug a code problems which are not related to WebSDK functions, but to ReactJS issues.
 

antu123

Member
hello

we are getting localVideo null value onload page time.
but when we click on test button localVideo value is <video id="localVideo" class="display"></video>
please check below screen short


1704861513885.png
 

Max

Administrator
Staff member
we are getting localVideo null value onload page time.
That's because the localVideo div element is not created yet. You should create it before calling Flashphoner.getMediaAccess() method because it is a placeholder for video tag needed to capture a camera from browser.
 

Max

Administrator
Staff member
when we are streaming with iPhone with camera list first camera working.
but on website load or hit url on browser that time list last camera working
Please try to reproduce the issue with Media Devices example on our demo server. What camera is used in this case?
 

antu123

Member
Please try to reproduce the issue with Media Devices example on our demo server. What camera is used in this case?
hello @Max

when we are streaming with iPhone with camera list first camera working.
but on website load or hit url on browser that time list last camera working

hello
can you review my code?
we are not getting issue in it
please check below code .
 

Attachments

Max

Administrator
Staff member
can you review my code?
Seems you're using a non-React way to create and render a various dynamic HTML tags. For example, read here or here or here how to use a select tag. May be you should find a more experienced React developer because learning ReactJS is out of scope of this forum/
Also please describe in details what exactly does not work. Step by step with screenshots.
 
Top