🏠 back to Observable

No video capture on iPhone?


#1

I’m trying to capture video from https://beta.observablehq.com/@mbostock/image-histogram but on iPhone I receive navigator.getUserMedia is not a function.

It seems that none of the functions in https://beta.observablehq.com/d/b5eacc27e35a8661 are defined

(tested with Chrome/iOS and Firefox/iOS)


#2

According to MDN navigator.getUserMedia() is deprecated and not supported on iOS Safari (which also applies to Chrome and Firefox on iOS since both must use Webkit).
You’ll probably want to try your luck with navigator.mediaDevices.getUserMedia().


#3

The code already has navigator.mediaDevices.getUserMedia, and falls back to navigator.getUserMedia if navigator.mediaDevices is absent. But neither works.


#4

What is your iOS version? I’m guessing 10.x?


#5

No. 12.1.1

Le mer. 19 déc. 2018 à 21:00, Fabian Iwand observablehq@discoursemail.com a écrit :


#6

If it works in Safari then Apple might not grant access for other browser implementations (see e.g. this issue). Unfortunately I currently don’t have access to either an iOS device or browserstack, but you could perhaps try to throw in adapter.js.