internal void OnPlayerSet(Player player)
        {
            if (_streamType == StreamType.Audio)
            {
                player.MediaStreamAudioSeekingOccurred     += MediaStreamSeekingOccurred;
                player.MediaStreamAudioBufferStatusChanged += MediaStreamBufferStatusChanged;
            }
            else
            {
                player.MediaStreamVideoSeekingOccurred     += MediaStreamSeekingOccurred;
                player.MediaStreamVideoBufferStatusChanged += MediaStreamBufferStatusChanged;
            }

            NativePlayer.SetMediaStreamBufferMaxSize(player.Handle, _streamType, _bufferMaxSize).
            ThrowIfFailed(player, "Failed to initialize the media stream configuration");

            NativePlayer.SetMediaStreamBufferMinThreshold(player.Handle, _streamType, _threshold).
            ThrowIfFailed(player, "Failed to initialize the media stream configuration");
        }