| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 8 | 8 |
| 9 $if DART2JS | 9 $if DART2JS |
| 10 @DomName('Navigator.language') | 10 @DomName('Navigator.language') |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 * 'optional': | 42 * 'optional': |
| 43 * [{ 'minFrameRate': 60 }, | 43 * [{ 'minFrameRate': 60 }, |
| 44 * { 'maxWidth': 640 }] | 44 * { 'maxWidth': 640 }] |
| 45 * }); | 45 * }); |
| 46 * | 46 * |
| 47 * See also: | 47 * See also: |
| 48 * * [MediaStream.supported] | 48 * * [MediaStream.supported] |
| 49 */ | 49 */ |
| 50 @DomName('Navigator.webkitGetUserMedia') | 50 @DomName('Navigator.webkitGetUserMedia') |
| 51 @SupportedBrowser(SupportedBrowser.CHROME) | 51 @SupportedBrowser(SupportedBrowser.CHROME) |
| 52 @Experimental | 52 @Experimental() |
| 53 Future<MediaStream> getUserMedia({audio: false, video: false}) { | 53 Future<MediaStream> getUserMedia({audio: false, video: false}) { |
| 54 var completer = new Completer<MediaStream>(); | 54 var completer = new Completer<MediaStream>(); |
| 55 var options = { | 55 var options = { |
| 56 'audio': audio, | 56 'audio': audio, |
| 57 'video': video | 57 'video': video |
| 58 }; | 58 }; |
| 59 $if DART2JS | 59 $if DART2JS |
| 60 _ensureGetUserMedia(); | 60 _ensureGetUserMedia(); |
| 61 this._getUserMedia(convertDartToNative_SerializedScriptValue(options), | 61 this._getUserMedia(convertDartToNative_SerializedScriptValue(options), |
| 62 (stream) { | 62 (stream) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 @JSName('getUserMedia') | 89 @JSName('getUserMedia') |
| 90 void _getUserMedia(options, _NavigatorUserMediaSuccessCallback success, | 90 void _getUserMedia(options, _NavigatorUserMediaSuccessCallback success, |
| 91 _NavigatorUserMediaErrorCallback error) native; | 91 _NavigatorUserMediaErrorCallback error) native; |
| 92 $endif | 92 $endif |
| 93 | 93 |
| 94 $!MEMBERS | 94 $!MEMBERS |
| 95 } | 95 } |
| OLD | NEW |