Exemplo n.º 1
0
    public void SetClip(string clipPath)
    {
        if (!_videoPlayer.isPlaying && startExperienceEvent)
        {
            startExperienceEvent.RaiseEvent();
        }
        SaveVideoInfo();
        string rootPath;

        if (Application.platform == RuntimePlatform.Android)
        {
            rootPath = Application.persistentDataPath.Substring(0, Application.persistentDataPath.IndexOf("Android", StringComparison.Ordinal));
            rootPath = Path.Combine(rootPath, "Movies");
        }
        else
        {
            rootPath = Path.Combine(Application.dataPath, "Videos/TestVideo");
        }

        string path = Path.Combine(rootPath, $"{clipPath}.mp4");

        _videoPlayer.url = path;
        _videoPlayer.Play();
        _videoPlayer.started       += IsPrepared;
        _videoPlayer.seekCompleted += SeekIsCompleted;
    }
Exemplo n.º 2
0
        protected override void OnCheckedForDeque(TProcessInfo oldInfo, TProcessInfo nextInfo, bool dequeued)
        {
            base.OnCheckedForDeque(oldInfo, nextInfo, dequeued);

            //broadcast the old process info to let listeners know that the process ended
            EventChannel.RaiseEvent(oldInfo);
        }
Exemplo n.º 3
0
 private void PlayVideo()
 {
     if (onVideoReadyEvent)
     {
         onVideoReadyEvent.RaiseEvent();
     }
     _videoPlayer.Play();
 }