コード例 #1
0
 private void AddListeners()
 {
     // Add to MediaPlayer new main group of listeners
     _mediaPlayer.AddMediaListener(this);
     // Add to MediaPlayer new "OnPlayerTimeChanged" listener
     _mediaPlayer.EventManager.PlayerTimeChangedListener += OnPlayerTimeChanged;
     // Add to MediaPlayer new "OnPlayerPositionChanged" listener
     _mediaPlayer.EventManager.PlayerPositionChangedListener += OnPlayerPositionChanged;
 }
コード例 #2
0
    private void AddListeners()
    {
        if (_mediaPlayer == null || _mediaPlayer.EventManager == null)
        {
            return;
        }

        // Add to MediaPlayer new main group of listeners
        _mediaPlayer.AddMediaListener(this);
        // Add to MediaPlayer new "OnPlayerTimeChanged" listener
        _mediaPlayer.EventManager.PlayerTimeChangedListener += OnPlayerTimeChanged;
        // Add to MediaPlayer new "OnPlayerPositionChanged" listener
        _mediaPlayer.EventManager.PlayerPositionChangedListener += OnPlayerPositionChanged;
        // Add to MediaPlayer new "OnPlayerSnapshotTaken" listener
        _mediaPlayer.EventManager.PlayerSnapshotTakenListener += OnPlayerSnapshotTaken;
    }