Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 9642 by
j...@google.com: getUserMedia not working when served
locally
http://code.google.com/p/dart/issues/detail?id=9642
I'm running on a Pixel, with the Crouton chroot and dartium from the
special hackathon build. I ran `rm -rf ~/.config/chromium/`.
I have an HTML page that uses Dart, and I'm serving from:
file:///home/ldap/path/to/index.html
MediaStream.supported returns true, window.navigator.getUserMedia() works
(audio and video are false by default), but setting either or both
audio/video in getUserMedia to true throws an exception:
Uncaught Error: Instance of 'NavigatorUserMediaError' undefined:1
Exception: Instance of 'NavigatorUserMediaError'
Stack Trace: #0 _FutureImpl._scheduleUnhandledError.<anonymous
closure> (dart:async:391:9)
#1 Timer.run.<anonymous closure> (dart:async:2362:21)
#2 Timer.run.<anonymous closure> (dart:async:2370:13)
#3 Timer.Timer.<anonymous closure> (dart:async-patch:15:15)
#4 _timerFactoryClosure.<anonymous closure>.<anonymous closure>
(file:///path/to/build/dartium-lucid64-inc/build/src/dart/tools/dom/src/Timer.dart:22:13)
FIXME:1
Everything works as expected if I instead run an HTTP server on localhost
and use that HTML page instead: I get a prompt for camera use, allow it,
and the camera can be used.
There are three issues:
- No prompt for camera when serving locally.
- MediaStream.supported returns true.
- The exception thrown is cryptic.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings