private void OnDestroy()
    {
        if (_mediaPlayer != null)
        {
            _mediaPlayer.RemovePreparedEvent(OnPlayerPrepared);
            _mediaPlayer.RemoveEndReachedEvent(OnPlayerEnded);
            _mediaPlayer.RemoveStoppedEvent(OnPlayerStopped);
        }

        if (_updateCanvasRatioEnum != null)
        {
            StopCoroutine(_updateCanvasRatioEnum);
        }

        ShowVideoCanvasBorder(false);
    }
Exemple #2
0
 void OnDestroy()
 {
     _player.RemoveStoppedEvent(OnStop);
 }