Exemplo n.º 1
0
        public PlayerServiceImpl(Window window)
        {
            dataProviders = new DataProviderFactoryManager();
            dataProviders.RegisterDataProviderFactory(new DashDataProviderFactory());
            dataProviders.RegisterDataProviderFactory(new HLSDataProviderFactory());
            dataProviders.RegisterDataProviderFactory(new RTSPDataProviderFactory());

            var drmManager = new DrmManager();

            drmManager.RegisterDrmHandler(new CencHandler());

            if (window == null)
            {
                window = WindowUtils.CreateElmSharpWindow();
            }
            var player = new EsPlayer(window);

            playerController = new PlayerController(player, drmManager);

            subscriptions = new CompositeDisposable
            {
                playerController.StateChanged()
                .Subscribe(state => { State = state; }, SynchronizationContext.Current)
            };
        }
Exemplo n.º 2
0
        private void CreatePlayerController()
        {
            if (playerWindow == null)
            {
                playerWindow = WindowUtils.CreateElmSharpWindow();
            }
            _player = new EsPlayer(playerWindow);

            playerController = new PlayerController(_player, drmManager);
        }
Exemplo n.º 3
0
        private void CreatePlayerController()
        {
            if (playerWindow == null)
            {
                playerWindow = WindowUtils.CreateElmSharpWindow();
            }
            var player = new EsPlayer(playerWindow);

            playerController = new PlayerController(player, drmManager);

            subscriptions = new CompositeDisposable
            {
                playerController.StateChanged()
                .Subscribe(state =>
                {
                    State = state;
                    stateChangedSubject.OnNext(state);
                }, () => stateChangedSubject.OnCompleted(), SynchronizationContext.Current),
                playerController.PlaybackError()
                .Subscribe(playbackErrorSubject.OnNext, SynchronizationContext.Current),
                playerController.BufferingProgress()
                .Subscribe(bufferingProgressSubject.OnNext, SynchronizationContext.Current)
            };
        }
Exemplo n.º 4
0
 public EsStreamController(EsPlayerPacketStorage storage)
     : this(storage,
            WindowUtils.CreateElmSharpWindow())
 {
     usesExternalWindow = false;
 }
Exemplo n.º 5
0
 public EsPlayer()
     : this(WindowUtils.CreateElmSharpWindow())
 {
 }