public void SetSelectedTrack(int type, int index)
 {
     _player.SetSelectedTrack(type, index);
     if (type == TypeText && index < 0 && _captionListener != null)
     {
         _captionListener.OnCues(new List <Cue>());
     }
 }
 public MvxVideoPlayer(IRendererBuilder rendererBuilder)
 {
     _rendererBuilder = rendererBuilder;
     _player          = ExoPlayerFactory.NewInstance(RendererCount, 1000, 5000);
     _player.AddListener(this);
     _playerControl             = new PlayerControl(_player);
     _mainHandler               = new Handler();
     _listeners                 = new List <IListener>();
     _lastReportedPlaybackState = StateIdle;
     _rendererBuildingState     = RendererBuildingStateIdle;
     // Disable text initially.
     _player.SetSelectedTrack(TypeText, TrackDisabled);
 }
Beispiel #3
0
 public VideoPlayer(IRendererBuilder rendererBuilder)
 {
     _rendererBuilder = rendererBuilder;
     _player = ExoPlayerFactory.NewInstance(RendererCount, 1000, 5000);
     _player.AddListener(this);
     _playerControl = new PlayerControl(_player);
     _mainHandler = new Handler();
     _listeners = new List<IListener>();
     _lastReportedPlaybackState = StateIdle;
     _rendererBuildingState = RendererBuildingStateIdle;
     // Disable text initially.
     _player.SetSelectedTrack(TypeText, TrackDisabled);
 }