getCapabilities static method
- String kind
Gets user's mobile media capabilities compared with Millicast Media Server support.
kind
- Type of media for which you wish to get sender capabilities.
Returns Map
with all capabilities supported by user's mobile and
Millicast Media Server.
Bug: This ticket is related to the implementation of
jsTrack.getCapabilities(), https://github.com/dart-lang/sdk/issues/44319
Implementation
static Future<Map> getCapabilities(String kind) async {
if (kind == 'video') {
List<String> codecs = await NativeChannel.supportedCodecs;
_logger.i('Supported video codecs for this device are $codecs');
return {'codec': codecs};
} else {
// kind is audio
return {'codec': []};
}
}