onVideoEvent property
Stream<Map<AdVideoEvent, dynamic> >
onVideoEvent
Listen to the video events the controller throws
Usage:
controller.onVideoEvent.listen((e) {
final event = e.keys.first;
switch (event) {
case AdVideoEvent.start:
print('video started');
break;
case NativeAdEvent.play:
print('video played');
break;
case AdVideoEvent.pause:
print('video paused');
break;
case AdVideoEvent.end:
print('video finished');
break;
case AdVideoEvent.muted;
print('video muted');
break;
case AdVideoEvent.unmuted;
print('video unmuted');
break;
default:
break;
}
});
For more info, read the documentation
Implementation
Stream<Map<AdVideoEvent, dynamic>> get onVideoEvent => _onVideoEvent.stream;