Пример #1
0
    public void Play(MediaItem media, Action onComplete = null)
    {
        FinishPlaying();

        IsPlaying = true;

        m_loadedVideo = false;
        m_startedPlay = false;
        m_waitingPlay = false;

        if (media != null && media.Url != null)
        {
            var videoUrl = WebServices.Instance.MediaDownloadManager.GetSystemUrl(media.Url);

            Player.Load(videoUrl);
            PlayerSurface.texture = Player.GetVideoTexture();
        }
    }