Play video embedded in the app ?

VLC for Android and Chrome OS specific usage questions
Fradow
Blank Cone
Blank Cone
Posts: 22
Joined: 10 Jan 2014 17:44

Play video embedded in the app ?

Postby Fradow » 26 Mar 2014 11:48

Hello,

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);
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 :

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.
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.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Play video embedded in the app ?

Postby edwardw » 27 Mar 2014 14:40

Probably you should read it with getResource and copy it to the SD.

Fradow
Blank Cone
Blank Cone
Posts: 22
Joined: 10 Jan 2014 17:44

Re: Play video embedded in the app ?

Postby Fradow » 27 Mar 2014 14:41

Ok, not supported I guess, it's understandable.

I'll do just that, thanks Edward.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 8 guests