You cannot use the File component to read from a video file like that.
How do I do that ? Should I make a new variable with the path of my video and then replace the "317....mp4" by it ?
Use the filePicker component to pick files from your shared directories (after they have been uploaded), set the picked file to the video source - you may need a clock (250ms interval) to give the player time to load the source
Thanks. But is there a way to configure this once and not have to do it every time I open the app?
What do you mean?
Try this app. It lists all MP4 files from your device via a ListViewer. By selecting the items you can then play all the videos.
My goal is to be able to select a video fo rech screen and by the press of a picture on a selection screen, play it and then go back to the main screen.
I'll give it a try. I keep you updated. Thanks
Unclear, please explain in more detail and post the relevant blocks.
Well, I have an array of several pictures and, each time one of them is pressed, I want the app to open a new screen to diplay a video that is different for every screen. Here are the blocks of the main screen (they're duplicated for each image) :
And, when on the screen that matches the image that has been clicked on by the user, a video launches :
However, since the maximum size of the apk is 100mb, I can't upload the videos I would like to diplay because they are over 200mb. Even compressed using handbrake, the total space used for those is over the 100mb limit.
Right now, there is only one video wich I used as a dummy for testing what I had built.
What I would like to do is manually enter the path of every single video in the app as I won't share it on play store, the video are going to stay in the internal memory of the device.
Is there a way to do so ? Every tutorial i've seen only shows how to load a file that is already in the package.
Thank you
Have a nice day
Alternatively, if the videos are encoded correctly with faststart, you could stream videos from an internet location.
Why do you need to open a different screen for each video, this makes your app overly complex, user can only watch one video at a time...
Yes but how can I change my code so that depending on the image clicked, the video changes ?
Where are the 200MB videos? On your computer, on your test device, in a cloud, on your own server...? Is this app intended only for your own purposes or should other users also be able to see these videos? If the latter, the videos must first be downloaded by the user (into one of the shared folders or the ASD).
Once the path of the video has been determined, the respective images can be linked to the video path.
It can be anything except cloud or internet.
Where is the folder to put them into ?
And again:
Well, for now the videos are on my computer but they can be putted in the internal memory of the device and the app is for my own purpose only.
When I try to get the path of the video on the device where the app is going to be, it shows me /Internal storage/downloads but not the /emulated/0/ etc. I saw in another post about it...
You can put (copy) the video(s) to any location of your device and then set the correct path(s) to it (them) to the VideoPlayer.Source and request READ_MEDIA_VIDEO
on Android 13+ or READ_EXTERNAL_STORAGE
permission on Android < 13.
For example, if you put the video "myVideo1.mp4
" in /Movies
the correct path is:
file:///storage/emulated/0/Movies/myVideo1.mp4
It works !!! Thanks you very much. You helped me se much.
Thmaks once again
have a nice day
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.