videoEventsFor method
Returns a Stream of VideoEventType
s.
Implementation
@override
Stream<VideoEvent> videoEventsFor(int textureId) {
var player =
VideoPlayerWinPlatform.instance.getPlayerByTextureId(textureId);
if (player != null) {
return player.videoEventStream;
} else {
// send an intialized-failed event
var streamController = StreamController<VideoEvent>();
streamController.add(VideoEvent(
eventType: VideoEventType.initialized, duration: null, size: null));
return streamController.stream;
}
}