| Index: sdk/lib/html/dartium/html_dartium.dart
|
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
|
| index 9e74e4fa9d4b08c067295a9f561c995a7a139356..18a5a71d47d0b670fef3e6847236b753e83fd7b9 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -18834,11 +18834,22 @@ class Navigator extends NativeFieldWrapperClass1 {
|
| * Gets a stream (video and or audio) from the local computer.
|
| *
|
| * Use [MediaStream.supported] to check if this is supported by the current
|
| - * platform.
|
| + * platform. The arguments `audio` and `video` default to `false` (no
|
| + * constraints), but will accept Maps in each parameter to specify mandatory
|
| + * and optional constraints for the media stream. Not passing in a map, but
|
| + * passing in `true` will provide a LocalMediaStream with audio or video
|
| + * capabilities, but without any additional constraints.
|
| *
|
| * Example use:
|
| *
|
| - * window.navigator.getUserMedia(audio:true, video: true).then((stream) {
|
| + * window.navigator.getUserMedia(
|
| + * audio: true,
|
| + * video: {'mandatory':
|
| + * { 'minAspectRatio': 1.333, 'maxAspectRatio': 1.334 },
|
| + * 'optional':
|
| + * [{ 'minFrameRate': 60 },
|
| + * { 'maxWidth': 640 }]
|
| + * }).then((stream) {
|
| * var video = new VideoElement()
|
| * ..autoplay = true
|
| * ..src = Url.createObjectUrl(stream);
|
| @@ -18851,8 +18862,8 @@ class Navigator extends NativeFieldWrapperClass1 {
|
| @DomName('Navigator.webkitGetUserMedia')
|
| @SupportedBrowser(SupportedBrowser.CHROME)
|
| @Experimental
|
| - Future<LocalMediaStream> getUserMedia({bool audio: false,
|
| - bool video: false}) {
|
| + Future<LocalMediaStream> getUserMedia({audio: false,
|
| + video: false}) {
|
| var completer = new Completer<LocalMediaStream>();
|
| var options = {
|
| 'audio': audio,
|
|
|