Hello All
I'm trying to change the Video Playback example code to play a video from an extrnal source, however, the examples on this site, including the one in this topic
https://developer.vuforia.com/forum/issues-and-bugs/it-possible-stream-video-url-video-playback-example
only show what needs to be changed in one place, even though it is obvious that if I change the code below as per instruction in VideoPlayerHelper file, I will be hard coding a singe video instead of an array, like the original example shows.
// This example shows how to load the movie from the // assets folder of the app // However, if you would like to load the movie from the // sdcard or from a network location // simply comment the three lines below AssetFileDescriptor afd = mParentActivity.getAssets() .openFd(filename); mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); afd.close(); // and uncomment this one //mMediaPlayer.setDataSource("/sdcard/myMovie.m4v");
Also, there are other parts of the code that obviously need to be changed, For example this part, which is checking in assets, once again, if the file exists:
// We need to verify that the file exists AssetFileDescriptor afd = mParentActivity.getAssets() .openFd(filename);
I'm sure there are others as well.
The instructions on what comonents need to be changed are a bit vague. I'm trying to find out the following:
1. How and from where should I pass the video name as a variable
2. How do I add (what should the path look like) my network stored movie files to the mMovieName array in VideoPlayback.java
3. Is there a more descripitive example of what immediate code needs to be adjusted to be able to play a network hosted video. Basically, saving me a couple of hours of skimming through the code and trying to catch every instance of when the source points to the assets folder and not the external source.
Thanks
(e.g. mMovieName[STONES] = "VideoPlayback/VuforiaSizzleReel_1.m4v";)