Play video embedded in the app ?
Posted: 26 Mar 2014 11:48
Hello,
I'm trying to play a video embedded in the app, using this code :
It works well when playing video outside the app, but when I'm trying to get a video embedded in the app, it doesn't.
I also tried :
- passing the entire URI, with : Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.tutorial).toString();
- passing the entire URI through LibVLC.PathToUri (which doesn't change the string anyway) : LibVLC.PathToURI((Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.tutorial).toString());
Here is the log :
Is LibVLC able to play a video embedded in the app ? If yes, how do you specify the path ? Else, I guess I just have to copy the video in the SD card before playing it.
Thanks.
I'm trying to play a video embedded in the app, using this code :
Code: Select all
Media m = new Media(vlc, LibVLC.PathToURI(videoFile.getPath()));
list.add(m);
vlc.setMediaList(list);
vlc.playIndex(0);
I also tried :
- passing the entire URI, with : Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.tutorial).toString();
- passing the entire URI through LibVLC.PathToUri (which doesn't change the string anyway) : LibVLC.PathToURI((Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.tutorial).toString());
Here is the log :
Code: Select all
03-26 11:32:58.525: E/VLC(3797): core input: open of `android.resource://com.mycompany.myapp/2130903040' failed
03-26 11:32:58.526: E/VLC(3797): core input: Your input can't be opened
03-26 11:32:58.526: E/VLC(3797): core input: VLC is unable to open the MRL 'android.resource://com.mycompany.myapp/2130903040'. Check the log for details.
Thanks.