Log in or register to post comments

Video Playback App: Handling events when movie plays fullscreen

August 31, 2012 - 7:54am #1

Hey all,

I am using the Vuforia Video Playback Sample App I'm attempting to call a URL directly after playback using Application.OpenURL().  This works as expected when the video plays on the texture in 3D space (the video finishes and my webview is called directly after).

However, when running the app on a device that does not support playback in 3D space on the texture, the video plays fullscreen and then just returns to the AR scene upon completion.

Is there an event that gets fired when the fullscreen video completes and returns to the Unity view?  I need to be able to send users to the URL after a fullscreen playback finishes using Application.OpenURL();\

I can't seem to see a specific callback in the logcat that informs Unity the video is finished upon returning to the scene.

Any assistance would be great!

Vince

 

Video Playback App: Handling events when movie plays fullscreen

September 4, 2012 - 2:27pm #3

Hey patch24,

That's the implementation I ended up using as a duct-tape fix for now.  I'd prefer to respond to the actual callback/event fired when returning to Unity from a fullscreen movie player.

This strategy works but, as mentioned, is called if the app is paused even outside of the one instance where it's paused/resumed for the fullscreen playback.  It's not bulletproof but gets the job done for now.

Vince

Video Playback App: Handling events when movie plays fullscreen

September 2, 2012 - 4:31pm #2

Hey Vince, if this is for Android, have you tried putting your logic in the OnApplicationPause method?  When the 'pause' bool gets set to false, you know the application came back from pausing, and therfore, playing fullscreen.  (or from a phone call or something else that might pause Unity, unfortunately)

ios doesn't pause Unity, just adds a subview on top.  In that case you could flip your own bool where ever your code could be calling for a fullscreen video play, then the next time mVideoPlayer state comes back as, I believe, STOPPED...you would know it came back from fullscreen.  (You'd have to debug log that to make sure that is that state after fullscreen playback)

Log in or register to post comments