Vuforia AR SDK - Cannot Play Video at URL

I am experimenting with the Vugoria Augmented Reality SDK, and these are samples. I successfully compiled a sample of the video pipe and launched it on the tablet. Then I tried to download the video from the URL, not from the device. Following the comments in the sample code, in VideoPlayerHelper.java I commented on this part:

// 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 commented on this part and added the url to the online video file:

mMediaPlayer.setDataSource("http://oneshot.qualcomm.com/webAR/content/strawberryfields_H264_AAC.mp4");

, , , , , , , . . , , ? vuforia. , (, , ) , , , :

Uri videolink = Uri.parse("http://oneshot.qualcomm.com/webAR/content/strawberryfields_H264_AAC.mp4");
mMediaPlayer.setDataSource(mParentActivity,videolink);
+4
1

. VideoPlayerHelper.java AssetFileDescriptor (3 )

//AssetFileDescriptor afd = mParentActivity.getAssets().openFd(filename);
//mMediaPlayer.setDataSource(afd.getFileDescriptor(),  afd.getStartOffset(),afd.getLength());
//afd.close();

uncommented/ : mMediaPlayer.setDataSource( " http://giftsoninternet.com/android/EngageApp/VuforiaSizzleReel_1.m4v" );

, VideoPlayback.java, assets/VideoPlayback.

// mMovieName[STONES] = "VideoPlayback/VuforiaSizzleReel_1.mp4";

P.S. - , STONES.jpg Vuforia. CHIPS, .

0

Source: https://habr.com/ru/post/1541412/


All Articles