I'm still having this issue running Vuforia 2.0 and Unity iOS/Android Pro version 3.5.7f6 and Xcode 4.5.2.
On Start() of a fresh scene, I call:
Handheld.PlayFullScreenMovie(videoPath, videoBackgroundColor);
From the console, this is the readout at the moment the video player attempts to play (i can see the transition happen and briefly see the native UI for the video player on iOS when I wrap the call into an IEnumerator and fire it on Start() by calling a coroutine with a short yield right after the Handheld call). It then immediately calls my debug statement "Video Finished" after trying to enable autoplay and failing.
On iOS6 iPhone 4S:
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextSaveGState: invalid context 0x0
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextClipToRect: invalid context 0x0
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextTranslateCTM: invalid context 0x0
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextDrawShading: invalid context 0x0
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextRestoreGState: invalid context 0x0
2013-03-15 11:31:48.030 app[13468:907] [MPAVController] Autoplay: Disabling autoplay for pause
2013-03-15 11:31:48.031 app[13468:907] [MPAVController] Autoplay: Disabling autoplay
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextSaveGState: invalid context 0x0
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextClipToRect: invalid context 0x0
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextTranslateCTM: invalid context 0x0
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextDrawShading: invalid context 0x0
Mar 15 11:31:48 Phineas app[13468] <Error>: CGContextRestoreGState: invalid context 0x0
2013-03-15 11:31:48.123 app[13468:907] [MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 0)
2013-03-15 11:31:48.227 app[13468:907] [MPAVController] Autoplay: Enabling autoplay
2013-03-15 11:31:48.264 app[13468:907] [MPAVController] Autoplay: Likely to keep up or full buffer: 0
2013-03-15 11:31:48.265 app[13468:907] [MPAVController] Autoplay: Skipping autoplay, not enough buffered to keep up.
2013-03-15 11:31:48.274 app[13468:907] [MPCloudAssetDownloadController] Prioritization requested for media item ID: 0
2013-03-15 11:31:48.328 app[13468:907] [MPAVController] Autoplay: Enabling autoplay
2013-03-15 11:31:48.359 app[13468:907] [MPAVController] Autoplay: Disabling autoplay for pause
2013-03-15 11:31:48.361 app[13468:907] [MPAVController] Autoplay: Disabling autoplay
Video Finished
The video I'm using was taken from an already published app that plays video on Android and iOS, so I know its the right format.
On iOS5.1 iPad3:
2013-03-15 11:50:30.689 app[6916:707] An instance 0x1d531e80 of class AVPlayerItem was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:
<NSKeyValueObservationInfo 0x1f8d4f40> (
<NSKeyValueObservance 0x1faa2430: Observer: 0x1fac8250, Key path: nonForcedSubtitleDisplayEnabled, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x1fa7b4c0>
<NSKeyValueObservance 0x1f98dd50: Observer: 0x1fa3d0b0, Key path: presentationSize, Options: <New: NO, Old: NO, Prior: NO> Context: 0x0, Property: 0x1d5d4e70>
)
iOS 5.1 and 6.0 are showing different debugs but similar behaviour.
Any help would be greatly appreciated. Upgrading to Unity 4.0 is not an option at the moment, so I'm hoping this issue can be resolved without the need to upgrade.
- Vince
Given that this thread is now 2 years old and the video playback code has been updated over numerous iterations, I was hoping that one of the moderators would be so kind to create a new thread/post sample code dedicated to creating a fullscreen video sample project in Unity. Perhaps this already exists? If so please post a link here.
It would be an added bonus to provide a recap on how to modify the VideoPlaybackController.cs script to force fullscreen video playback and perhaps create a pin on the Unity Extension forum front page.
Also, it would be nice to include an example regarding how to pause any other AR and/or audio instances once the the video player launches? I have a looping audio track that plays upon target recognition that I would like to pause when the video player is in action.
Thank you for all of the contributions to this topic and as always your help is much appreciated!