Hi railon,
Here is how you can fix the iOS 9.2 issue on the VideoPlayback sample apps, native and Unity (without having to split the audio from the video, as you did):
Native Videoplayback sample fix:
Edit the file VideoPlayerHelper.m; the color-highlitghted lines below are the ones to be added to the original code:
switch (status) {
case AVPlayerItemStatusUnknown:
DEBUGLOG(@"AVPlayerItemStatusObservationContext -> AVPlayerItemStatusUnknown");
if (mediaState != PLAYING) { // ADD THIS LINE
mediaState = NOT_READY;
}// ADD THIS LINE
break;
case AVPlayerItemStatusReadyToPlay:
DEBUGLOG(@"AVPlayerItemStatusObservationContext -> AVPlayerItemStatusReadyToPlay");
if (mediaState != PLAYING) { // ADD THIS LINE
mediaState = READY;
} // ADD THIS LINE
Unity Videoplayback sample:
(same code change but slightly more involved process)
In this case you need to edit the source code of the VuforiaMedia plugin which is located under /Assets/Plugins/iOS/VuforiaMedia in the VP Unity sample project
· Rename the VideoPlayerHelper.m.txt to VideoPlayerHelper.m
· Rename the VideoPlayerWrapper.mm.txt to VideoPlayerWraper.mm
· Open the Xcode project in the VuforiaMedia folder
· Edit the file VideoPlayerHelper.m; the color-highlitghted lines below are the ones to be added to the original code:
switch (status) {
case AVPlayerItemStatusUnknown:
DEBUGLOG(@"AVPlayerItemStatusObservationContext -> AVPlayerItemStatusUnknown");
if (mediaState != PLAYING) { // ADD THIS LINE
mediaState = NOT_READY;
} // ADD THIS LINE
break;
case AVPlayerItemStatusReadyToPlay:
DEBUGLOG(@"AVPlayerItemStatusObservationContext -> AVPlayerItemStatusReadyToPlay");
if (mediaState != PLAYING) { // ADD THIS LINE
mediaState = READY;
} // ADD THIS LINE
· Build the Xcode project
· Locate the libVuforiaMedia.a generated by Xcode upon build completion, and copy it to the Assets/Plugins/iOS folder (overwrite the existing one)
· Close the Xcode project
· Rename VideoPlayerHelper.m back to VideoPlayerHelper.m.txt
· Rename the VideoPlayerWrapper.mm back to VideoPlayerWraper.mm.txt
· Refresh and rebuild the VideoPlayback sample Unity project
Ok, I tested on the iPhone (9.2) a test project where the vuforia video playback sample was used. There're two videos in that sample. One default and one from us where we tested a video with transparency. Both work in that setup.
I'm creating a new build and implemented the video which is not working to that sample project. We'll see if it works in that project. But I guess it somehow has to do with that video file. Though it was working with iOS 9.1
I'll update this thread once I have more info.