- Home /
PlayMovieURL issue with iOS 5.0.1
Hello,
iPhoneUtils.PlayMovieURL works well on iOS 4.3 when I play a video from Documents folder on iPad, but it doesn't work in iOS 5.0.1 The video player is launched, but the movie is stopped and the player is then closed.
I use XCode 4.0.1 and iOS SDK 4.3
Joel
I am having the same problem -= Here is my calling code iPhoneUtils.Play$$anonymous$$ovieURL(Utility.GetStrea$$anonymous$$gAssetsPath() + "Video/TestVideo2.mov", Color.black, iPhone$$anonymous$$ovieControl$$anonymous$$ode.CancelOnTouch);
where GetStrea$$anonymous$$gAssetsPath points to the right directory
In XCode I am getting the following error :
An instance 0xb967d50 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 NS$$anonymous$$VODeallocateBreak to stop here in the debugger. Here's the current observation info: ( Context: 0x0, Property: 0x899d170> Context: 0x0, Property: 0x8999d90> )
I am using unity 3.4.2 / xcode 4.2 The project is setup with SD$$anonymous$$ Version : Latest Target iOS Version : 4.3 $$anonymous$$y iPad is running iOS 5.0.1
Any ideas ?
Answer by kaaJ · Nov 21, 2011 at 11:36 PM
Hey guys,
I had the same problem. Just putting "file://" before Application.persistentDataPath worked out fine. You didn't need to do this in ios 4.3.
So for example:
iPhoneUtils.PlayMovieURL("file://"+Application.persistentDataPath + "/" + "moviename.m4v", Color.black, iPhoneMovieControlMode.Hidden);
Grtz, kaaJ
You're right kaaJ. THAT'S THE SOLUTION. Thanks!
$$anonymous$$
Answer by neoRiley · Feb 16, 2012 at 02:46 AM
This worked for me as well. Also, verify the path being passed. I saw this same error simply because ".mp4" was omitted from the end of the path.