Video player error 701 not playing videos from assets

I uploaded a small video into the assets and used video player to play it but unfortunately I get an error 701 and video is not playing after building the apk although it works fine in the companion …

I need this video to be in the apk not online

how can I do it?

For now you can’t

1 Like

always search before posting, that was a bug and i think its not get fixed yet.

2 Likes

Not get fixed

I solved this issue using a trick …

I made the app search for the video in a hidden folder and sure it won’t be found, then the app will copy the video from the assets to this hidden folder . And it worked very fine for me

1 Like

Is the bug fixed? how did u solve? some blocks would help . thanks

could you please share the aia

No, this bug is not fixed, even not on the Beta server.
I reported this bug already on July 2019.

The approach of @drpeterramsis2007 is not really a solution or a trick, as you should always avoid that unnecessary permissions are required (in this case: READ_ / WRITE_EXTERNAL_STOARGE).

Therefore you should wait for a fix or use an extension.
If you still want to go this way, you have to use Taifun’s file extension (App Inventor Extensions: File | Pura Vida Apps), because the File component does not work when copying from the assets (I reported this bug also serveral times).

Check this APK: videoPlayer_test.apk (5.4 MB)

The video testVideo.mp4 is copied from the assets to
/storage/emulated/0/Download/testVideo.mp4
and is played from there.

1 Like

thanks for this replay but still i need to solve the problem I’m a beginner so some time i couldn’t understand well what you are try to explain to me .
when I’m asking for aia that’s mean is this the way to me tracking the blocks to get my results as i want

Here are the blocks of my APK:

@Kodular are you aware of this bug report?
Taifun

1 Like

Sorry for being away as I am a pharmacist and fighting this pandemic nowadays in my country …

I will share my solution soon … but this is still a bug in the video player .
I just tried to bypass this error to use videos in my app …

But solving this bug would be more useful…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

I get the error message 701 when playing music from Assets. The same error described in Video player error 701 not playing videos from assets. This problem was solve or have some workarround ?

You upload music to assets folder ?
What you have tried, you could upload your relevant blocks

1 Like

Hi Bestprintsf,

Yes, I uploaded to assets using the botton “Assets” on the Creator.kodular.io. Here under the block :

image

Tks in advance

Try set //alarm_pao.mp3

1 Like

You can insert file componet into you proyect next add to block like Read from file options and see how to its work is the same for all files > Read, play, etc

1 Like

Here is File documentation about Read From
https://docs.kodular.io/components/storage/file/#read-from
He says:
Reads text from a file in storage. Prefix the filename with / to read from a specific file on the SD card. for instance /myFile.txt will read the file /sdcard/myFile.txt. To read assets packaged with an application (also works for the Companion) start the filename with // (two slashes). If a filename does not start with a slash, it will be read from the applications private storage (for packaged apps) and from /sdcard/AppInventor/data for the Companion.

Is the same for read, play, show image or what you need for any file from assets

1 Like