newPlayer method

  1. @override
Future<String> newPlayer({
  1. String? url,
})
override

Implementation

@override
Future<String> newPlayer({String? url}) async {
  final playerId = DateTime.now().microsecondsSinceEpoch.toString();
  final player = VideoJsPlayer(playerId, listener: _rootPlaybackListener, plugin: this);
  webVideoPlayers[playerId] = player;
  stateNotifier.getOrAddPlayerNotifier(playerId);
  return playerId;
}