private void OnGUI() { GUI.skin = skin; GUILayout.BeginArea(new Rect(10f, 10f, 200f, Screen.height)); if (GUILayout.Button("Stop/Play", new GUILayoutOption[0])) { if (isPlaying) { PSVitaVideoPlayer.Stop(); } else { PSVitaVideoPlayer.Play(MoviePath, PSVitaVideoPlayer.Looping.Continuous, PSVitaVideoPlayer.Mode.FullscreenVideo); } } GUILayout.EndArea(); }
private void OnGUI() { GUI.set_skin(this.skin); GUILayout.BeginArea(new Rect(10f, 10f, 200f, (float)Screen.get_height())); if (GUILayout.Button("Stop/Play", new GUILayoutOption[0])) { if (this.isPlaying) { PSVitaVideoPlayer.Stop(); } else { PSVitaVideoPlayer.Play(this.MoviePath, 1, 1); } } GUILayout.EndArea(); }
//private void OnEvent(MovieEvent iEventID) private void OnEvent(int iEventID) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected I4, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Invalid comparison between Unknown and I4 //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Invalid comparison between Unknown and I4 //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 switch (iEventID - 1) { case 0: PSVitaVideoPlayer.Stop(); _isPlaying = false; if (_actOnStop != null) { _actOnStop(); } _strSubTitleText = string.Empty; return; case 1: if (_actOnReady != null) { _actOnReady(); } return; case 2: _isPlaying = true; if (_actOnPlay != null) { _actOnPlay(); } return; case 3: if (_actOnPause != null) { _actOnPause(); } return; case 4: _isBufferingSuccess = true; if (_actOnBuffering != null) { _actOnBuffering(); } return; } if ((int)iEventID != 16) { if ((int)iEventID != 32) { if ((int)iEventID == 48 && _actOnEncryption != null) { _actOnEncryption(); } return; } if (_actOnWarningID != null) { _actOnWarningID(); } ImmediateOnFinished(); } else { _strSubTitleText = PSVitaVideoPlayer.subtitleText; if (_actOnTimedTextDelivery != null) { _actOnTimedTextDelivery(); } } }
public void ImmediateOnFinished() { PSVitaVideoPlayer.Stop(); AutoOnFinished(); }