Start a new topic
Solved

Unable to load videos locally

Hi,


I am using the Wikitude 5.3 Android Java SDK.


The first step is where I'm loading the assets from the website. It works completely fine with no issues.


The app gives the user an option to use it in the offline mode. There I'm downloading the entire assets in the user's external storage under a folder in the name of the app. To be more precise, it downloads the zip file and then extracts the files in the same structure.


Once the download is complete, I'm refreshing the activity pointing the index.html to the location where the files have been downloaded.


The architect view loads without an issue and also I'm able to see the buttons and gifs. However for some reason the videos do not play. The path to the directory is correct as all the images and videos are stored in the same asset folder. I can even see the videos in the mobile file manager. 


When I check the android debugger it shows the following output:


02-21 20:34:19.662 23702-25326/com.digied.visualshiksha E/ExtMediaPlayer-JNI: env->IsInstanceOf fails

02-21 20:34:19.662 23702-25326/com.digied.visualshiksha E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0

02-21 20:34:19.662 23702-25326/com.digied.visualshiksha E/ExtMediaPlayer-JNI: env->IsInstanceOf fails

02-21 20:34:19.662 23702-25326/com.digied.visualshiksha E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0

02-21 20:34:19.663 23702-25326/com.digied.visualshiksha W/System.err: java.io.IOException: setDataSource failed.

02-21 20:34:19.663 23702-25326/com.digied.visualshiksha W/System.err: at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1095)

02-21 20:34:19.663 23702-25326/com.digied.visualshiksha W/System.err: at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1040)

02-21 20:34:19.663 23702-25326/com.digied.visualshiksha W/System.err: at s.a(ProGuard:103)

02-21 20:34:19.663 23702-25326/com.digied.visualshiksha W/System.err: at o$1.run(ProGuard:197)

02-21 20:34:19.663 23702-25326/com.digied.visualshiksha W/System.err: at java.lang.Thread.run(Thread.java:818)

02-21 20:34:19.663 23702-25326/com.digied.visualshiksha E/o: Exception when playing video setDataSource failed.


There is no problem with the js file as it working on the server and is able to fetch images stored locally.


Looking forward for your help.


Hi,


Thanks for your help.


Realised the issue was with the zip format. Changed the zip preset to STORE and it worked fine.


Cheers!

Neelesh R Pednekar

Hi Neelesh,

Please ensure that the Wikitude SDK relevant includes like
      <script src="architect://architect.js"></script>
      <script type="text/javascript" src="../ade.js"></script>

is included before any AR.* namespace is used.


What you could do is test if you can load images locally and then test if you can play a video by providing a url for this video.


Thanks

Eva

Login or Signup to post a comment