- Home /
iOS Handheld.PlayFullScreenMovie not working
Hi guys,
I've been struggling with playing a video stored locally for iOS.
Here's some details:
Device: iPodTouch 2g 4.2.1
Unity 3.5.2f2
Xcode 4.3
So I'm placing the video file in my Assets/StreamingAssets folder. I've tried .mov and .mp4.
All I get is the iOS player showing up for a couple of seconds with a black background then dismiss and go back to unity.
I have tried different approaches regarding the file path as follows:
string dpath = "file://"+ Application.dataPath + "/Raw/downing.mp4";
string dpath = Application.dataPath + "/Raw/downing.mp4";
string dpath = "downing.mp4";
Calling at:
Handheld.PlayFullScreenMovie(dpath);
Any thoughts? anyone please? Really need to put this together soon.
I'am having the same problem running my game in the Ipad. On android devices the video goes smoothly but on the ios the player appears for a couple of seconds then i'm back to the game. Did you have any luck with this problem?
On the Xcode i got this: 2012-07-12 14:29:41.046 beta[5402:707] An instance 0xb28fd40 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: 0xb28d1a0> Context: 0x0, Property: 0xb3ae300>)
Having the same problem. Videofile (mp4) works fine in test project inside Start() and goes black and drops "..AVPlayerItem was deallocated while key value observers were still registered with it.." in the big project so the problem might be not in the path to the movie.
This path did work "file://"+Application.strea$$anonymous$$gAssetsPath+"/$$anonymous$$S_Video01.mp4"
Same exact problem here. Did anyone come up with a solution?
I check that tomorrow morning at works ;) Cause we have some games with video on start.
Answer by Santa · Oct 25, 2012 at 02:22 PM
Just a thought. Do you start playing inside Update() or Start() or something? May be it affects.
Also check that standard iPod player plays your video. To be sure that codecs are OK.
My video playing fine at iPod 2G. Format is MOV. Path is simple: string dpath = "some.mov";
Answer by Umang · Feb 14, 2015 at 10:14 AM
it will work only with streming asset folder. You have to put your video in streming asset folder and need to use Application.stremingassetpath.