PlayerViewState constructor

PlayerViewState()

Implementation

PlayerViewState() {
  // Do not pass references to the widget's functions to the platform
  // interface as the widget might get re-built on state changes and the
  // references could change and become invalid.
  _playerViewPlatformInterface =
      BitmovinPlayerPlatformInterface.instance.createPlayerView(
    onPlatformEvent: (Event event) => widget.onEvent(event),
    handleEnterFullscreen: () => widget.fullscreenHandler?.enterFullscreen(),
    handleExitFullscreen: () => widget.fullscreenHandler?.exitFullscreen(),
    onViewCreated: () => widget.onViewCreated?.call(),
  );
}