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 override void Populate(MediaContent data) { VideoSubpanel.Play(data.MediaItem); PopulateComponents(VideoSubpanel); if (UseFullScreen && VideoControls) { VideoControls.EnterFullScreen(); } base.Populate(data); }
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(MediaItem data) { if (data.MediaType == MediaType.Video) { VideoSubpanel.Play(data); PopulateComponents(VideoSubpanel); if (UseFullScreen && VideoControls) { VideoControls.EnterFullScreen(); } } else { HideLinkedObjects(); } }
public void PlayVideo(MediaItem media) { // Sanity, video should be enabled. Audio disabled. VideoContainer.gameObject.SetActive(true); AudioContainer.gameObject.SetActive(false); VideoContainer.SetFullScreen(UseFullScreen); // Pass the ref to video controls so that it can rotate the video. if (VideoContainer.FullScreen) { VideoContainer.FullScreen.GetComponentInChildren <VideoControls>().VideoSubpanel = VideoContainer; } VideoContainer.Play(media, () => { VideoContainer.SetFullScreen(UseFullScreen); }); m_videoControlsPushedPanel = VideoControlsTarget.PushPanel(VideoControls) as ControlsPanel; if (m_videoControlsPushedPanel == null) { return; } // Set the controls to on and disable the audio control functionality of the controls object. m_videoControlsPushedPanel.gameObject.SetActive(true); m_videoControlsPushedPanel.Disable(typeof(AudioSubpanel)); if (!VideoContainer.FullScreen) { m_videoControlsPushedPanel.DisableFullScreen(); } // HACK: toggle to get audio playing. Fix this asap. VideoContainer.gameObject.SetActive(false); VideoContainer.gameObject.SetActive(true); }
public override void Populate(MediaContent data) { VideoSubpanel.SetFullScreen(UseFullScreen); VideoSubpanel.Play(data.MediaItem); }