This works for me on iOS:
Handheld.PlayFullScreenMovie ("movie.mp4", Color.black, FullScreenMovieControlMode.Hidden);
but not on Android i get this error and the player briefly opens and closes:
E/MediaPlayer(24820): pause called in
state 1 E/MediaPlayer(24820): error (-38, 0)
so i tried
Handheld.PlayFullScreenMovie (Application.streamingAssetsPath + "/movie.mp4", Color.black, FullScreenMovieControlMode.Hidden);
and now instead get this error:
I/AwesomePlayer( 128): setDataSource_l(URL suppressed)
E/ ( 128): Failed to open file ‘jar:file:///data/app/com.mycompany.myapp-1.apk!/assets/movie.mp4’. (No such file or directory)
E/MediaPlayer(26492): error (1, -2147483648)
E/MediaPlayer(26492): pause called in state 0
E/MediaPlayer(26492): error (-38, 0)
I’ve unzipped the APK and confirmed that the movie.mp4 file is in fact where it’s supposed to be.
The worst of it is that this used to work. When I was prototyping we had to ensure video would work, and it did, back in unity 3.5.6. So I’m wondering if something broke in the move to Unity4? Has anybody else run into this issue and solved it?
The first method (ie. just "movie.mp4") is working for me in Unity 4.3.2f1 on my Android device (Galaxy Nexus, Android 4.4.2). I tried your second method first and could not get it to work. My current problem is that I can't load any video from a subfolder, such as "/videos". This function only seems to recognize a file name without any sort of path in the name. This means I can put my videos only in the /assets/streamingassets folder, which ends up in the apk as the /assets folder.
– rastabbqI've also learned that Android playback can be finicky about format. You could try looking here for guidance: http://developer.android.com/guide/appendix/media-formats.html
– rastabbqDid you ever manage to solve this issue? I have tried about 15 different rtsp stream urls and i always get the same error(same as you on different devices). I'm starting to think it's a Unity issue.
– Orfen