tracking.js
tracking.js copied to clipboard
tracking.js is not supported in IOS 11
Apple now officially "supports" WebRTC in iOS 11, but when I run the tracking sample in Safari in IOS11, and allow tracking.js to access the camera, it's still not working
For reference, here's the screenshot of the website on iOS 11 (on an iPhone 7):
And here's the error it generates in the console (not emulated, plugged iPhone into computer running Safari Preview):
Looks like it's 404ing when attempting to get the MediaStream on iOS?
This shim fixes the issue. https://github.com/webrtc/adapter
whoaa.. what is this ? @MKRazz is this going to be fixed for trackingjs ? or how do we use it ?
@omarojo It's like a polyfill, so you just need to include its adapter.js first, then it should just work in tracking.js.
@MKRazz doesn't seem to work for me on iOS 11.12 + Cordova 7.0.1
Heja!
Just a sidenote... as it's fixed using the adapter.js, I'd suggest to include it directly in the example(s). Thus when checking it out, it just works without any further questions asked (or issues searched).
Also adding a note in the readme would feel helpful..
Had to set these attributes in ios 12: video.setAttribute('autoplay', ''); video.setAttribute('muted', ''); video.setAttribute('playsinline', '');