public void Play() { // Play the player if (AudioSubPanel != null && IsEnabled(typeof(AudioSubpanel))) { AudioSubPanel.Play(); } if (VideoSubPanel != null && IsEnabled(typeof(VideoSubpanel))) { VideoSubPanel.Play(); } // Play Hook. if (OnPlay != null) { OnPlay(); } if (PlayPauseText != null) { PlayPauseText.text = _pauseCharacter; } _isPaused = false; }
public void PlayAudio(MediaItem media) { AudioContainer.gameObject.SetActive(true); AudioContainer.Play(media); m_audioControlsPushedPanel = AudioControlsTarget.PushPanel(AudioControls) as ControlsPanel; if (m_audioControlsPushedPanel == null) { return; } VideoContainer.gameObject.SetActive(false); if (m_videoControlsPushedPanel) { m_videoControlsPushedPanel.SetActive(false); } m_audioControlsPushedPanel.gameObject.SetActive(true); m_audioControlsPushedPanel.Disable(typeof(VideoSubpanel)); m_didLoseTopAudio = () => { m_audioControlsPushedPanel.AudioSubPanel.Stop(); }; OnClose += m_didLoseTopAudio; }
private void Play() { // Play the player if (m_audioSubpanel != null) { m_audioSubpanel.Play(); } if (m_videoSubpanel != null) { m_videoSubpanel.Play(); } m_isPaused = false; }
public override void Populate(Motive.Core.Models.MediaContent obj) { m_subpanel.Play(obj.MediaItem); base.Populate(obj); }