Hi all i was trying to play a video using the video player but when i try to play it on the companion then in app inventor website it shows the error undefined
error
My designer tab
my code
google drive link
https://drive.google.com/uc?export=download&id=17mnQ5z6sYEen8MSIMAEeNyc1sjDET3MK
I suggest you to upload your video on cloundinary when you upload your video they give you a url copy that url and paste it in video player source also I see volume of video player is 0 in designer
2 Likes
Assuming that the URL resolves to a valid video without any Google authentication credentials this should work. Can you tell us more about your setup?
is it because of this
that the
google url is not working
nothing as such was just trying to have a look how does the video player exactly work
I have attached my code and the photo of designer tab in post 1
Sir i tried to upload this file in the assets but i got a error message that the file is too big then i tried another file (this one) https://drive.google.com/uc?export=download&id=15NTswr6xEovqTf3vc2namiYfZBv2z7tH
this is also not uploading on the assets can you help me
Use cloudinary, I personally suggest it
2 Likes
@Know_About_IT
see my new code
cloudinary url
https://res.cloudinary.com/dedxsuxex/video/upload/v1627017351/samples/My_Video1_nbcmls
still not working
error message
if you want i can share the aia on pm
You want to use this video as the background if yes can I give you a suggestion...
Start the video when button click
1 Like
yes i want to do that only
First, think about what player you want to use. You create a topic with a built-in player and in the meantime you switch to the extension.
The video is 849 Mb. You cannot add it to your Project. Have you tried linking to the url (setting the VideoPlayer.Source to the url of the video?
1 Like
Yep that's exactly what I've done. I also tried adding a 'PRESS TO START' button but it shows the same error.
Perhaps because
Documentation for the VideoPlayer indicates you can also set the media source to a URL that points to a streaming video, but the URL must point to the video file itself, not to a program that plays the video.
The link points to a program that plays the video.
1 Like
I don't think so for in this case, the video player is this https://images.nasa.gov/details-JPL-20170404-CASSINf-0001-2560x1080 and the corresponding video file is this: https://images-assets.nasa.gov/video/JPL-20170404-CASSINf-0001-2560x1080/JPL-20170404-CASSINf-0001-2560x1080~orig.mp4. Now this has to be a video file since it ends in .mp4.
Nevertheless, could you give me a link to a video file that plays perfectly in the VideoPlayer without the error popping up?
It appears from the conversation in the community https://community.appinventor.mit.edu/search?q=videoplayer%20mp4 the VideoPlayer has issues playing mp4 files directly from a url. The apparent work around is to download the video and play from a non asset directory.
1 Like