mediaPlayerSetPlayerCanvas method
Future<void>
mediaPlayerSetPlayerCanvas(
- int index,
- Map canvas
)
Implementation
Future<void> mediaPlayerSetPlayerCanvas(
int index, Map<dynamic, dynamic> canvas) async {
var viewElem = document.getElementById("zego-view-${canvas["view"]}");
if (_mediaPlayers[index] == null) {
return Future.value();
}
ZegoFlutterEngine.instance.setStyleByCanvas(jsonEncode(canvas));
await (() {
Map completerMap = createCompleter();
ZegoFlutterEngine.instance.mediaPlayerSetPlayerCanvas(
viewElem,
canvas,
_mediaPlayers[index].instance,
completerMap["success"],
completerMap["fail"]);
return completerMap["completer"].future;
})();
return Future.value();
}