Closed zsalab closed 7 years ago
Thank you very much for doing this! I agree, this the best solution for now, until we can figure out what is going on with iOS 11.
@zsalab I threw together a quick test and it is working as expected on my ipad running ios 11 beta. Please have a look.
Thank you, I think PR is welcome. I am not an iOS developer and I am not willing to upgrade my phone before the 2nd/3rd minor version coming... unfortunately it does not work in the simulator.
None of these works with the simulator: https://webrtc.github.io/samples/src/content/getusermedia/gum/ https://mozilla.github.io/webrtc-landing/gum_test.html
I found the error thanks to @positlabs working example. You can check out the change in my fork, but the taken image will has deformed (this is the reason I have not sent a pull request yet). You can try: http://zettasystem.com/webcamjs/demos/basic.html I hope I will have some time to figure out the problem with the deformation.
I made pretty much the exact same changes as you, then saw your post.
I get a similar distortion (except it's vertical instead of horizontal) in MS Edge. I haven't figured a way around it yet, but haven't put much time into it.
Not a good idea. Safari on iOS 11 supports getUserMedia() and this patch totally disables it for all iOS versions. I suggest to discard this change and to improve the getUserMedia() polyfill instead.
I added
if (this.iOS || Webcam.isSafari ) { video.srcObject = stream; }else{ video.src = window.URL.createObjectURL( stream ) || stream; }
to the if (this.userMedia) section in the attach function.
defined isSafari under iOS, isSafari: /Safari/.test(navigator.userAgent) && !window.MSStream,
Currently iOS 11 looks support userMedia but I could not manage to get work (please let me know if you have a solution), in a meantime it would be nice to have the old style iOS support
245