Esempio n. 1
0
    public void PlayVideo()
    {
        m_canvas.SetActive(true);
        StreamVideo stream = m_canvas.GetComponent <StreamVideo>();

        stream.SetAdress(m_videoAdress);
        stream.PlayVideo();
    }
Esempio n. 2
0
        public override void Enter()
        {
            levelManager = FindObjectOfType <LevelManager>();
            ui           = context.gameManager.GetUIManager();

            videoStream = levelManager.GetVideoStream();
            if (videoStream != null)
            {
                videoStream.OnVideoEnd += SetupStartGame;
                videoStream.PlayVideo();
            }
            else
            {
                SetupStartGame();
            }
        }
Esempio n. 3
0
    void ShowCurrentSubtitles()
    {
        gameObject.SetActive(true);
        text.text        = subtitles[subtitlesId].text;
        audioSource.clip = subtitles[subtitlesId].audio;

        if (subtitles[subtitlesId].audio != null)
        {
            StartCoroutine(HideSubtitles(subtitles[subtitlesId].audio.length + subtitles[subtitlesId].extraTime));
        }
        else
        {
            StartCoroutine(HideSubtitles(subtitles[subtitlesId].extraTime));
        }

        streamVideoScript.PlayVideo(audioSource);
    }