mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 15:01:30 +00:00
Added getLegacyStats until Chrome fully supports new getStats() API.
TBR=alanknight@google.com Change-Id: Iea06485fc54cdbcb30f1cc1bf7a10f97335e242a Reviewed-on: https://dart-review.googlesource.com/63442 Reviewed-by: Alan Knight <alanknight@google.com> Reviewed-by: Terry Lucas <terry@google.com> Commit-Queue: Terry Lucas <terry@google.com>
This commit is contained in:
parent
64641d014b
commit
fd26d67a0b
3 changed files with 36 additions and 0 deletions
|
@ -25477,6 +25477,23 @@ class RtcPeerConnection extends EventTarget {
|
|||
return completer.future;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporarily exposes _getStats and old getStats as getLegacyStats until Chrome fully supports
|
||||
* new getStats API.
|
||||
*/
|
||||
@JSName('getStats')
|
||||
Future<RtcStatsResponse> getLegacyStats([MediaStreamTrack selector]) {
|
||||
var completer = new Completer<RtcStatsResponse>();
|
||||
_getStats((value) {
|
||||
completer.complete(value);
|
||||
}, selector);
|
||||
return completer.future;
|
||||
}
|
||||
|
||||
@JSName('getStats')
|
||||
Future _getStats(
|
||||
[RtcStatsCallback successCallback, MediaStreamTrack selector]) native;
|
||||
|
||||
static Future generateCertificate(/*AlgorithmIdentifier*/ keygenAlgorithm) =>
|
||||
JS('dynamic', 'generateCertificate(#)', keygenAlgorithm);
|
||||
|
||||
|
|
|
@ -16403,6 +16403,9 @@
|
|||
"generateCertificate": {
|
||||
"support_level": "untriaged"
|
||||
},
|
||||
"getLegacyStats": {
|
||||
"support_level": "untriaged"
|
||||
},
|
||||
"getLocalStreams": {},
|
||||
"getReceivers": {
|
||||
"support_level": "untriaged"
|
||||
|
|
|
@ -50,6 +50,22 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
|
|||
return completer.future;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporarily exposes _getStats and old getStats as getLegacyStats until Chrome fully supports
|
||||
* new getStats API.
|
||||
*/
|
||||
@JSName('getStats')
|
||||
Future<RtcStatsResponse> getLegacyStats([MediaStreamTrack selector]) {
|
||||
var completer = new Completer<RtcStatsResponse>();
|
||||
_getStats((value) {
|
||||
completer.complete(value);
|
||||
}, selector);
|
||||
return completer.future;
|
||||
}
|
||||
@JSName('getStats')
|
||||
Future _getStats(
|
||||
[RtcStatsCallback successCallback, MediaStreamTrack selector]) native;
|
||||
|
||||
static Future generateCertificate(/*AlgorithmIdentifier*/ keygenAlgorithm) =>
|
||||
JS('dynamic', 'generateCertificate(#)', keygenAlgorithm);
|
||||
|
||||
|
|
Loading…
Reference in a new issue