Using Online video files with the VideoPlayer component

345 views
Skip to first unread message

Yossi Yaron

unread,
Jan 25, 2018, 5:33:19 AM1/25/18
to MIT App Inventor Forum
Hi,
I tried using a link to an mp4 file which I uploaded to my google drive.
I separated the "set source" action from the "start" action to make sure there is no timing issue, and yet when I click the "Load" button (which sets the video source to the URL) the application hangs.
I'm attaching the AIA file (Note: we are talking about Screen2).
Am I doing something wrong from a programming standpoint or should I simply be using a different online source and not Google Drive? If it is the latter, can anyone recommend a free streaming video service that meets AppInventor requirements?
Thank you
Yossi Yaron

Yossi Yaron

unread,
Jan 25, 2018, 5:36:40 AM1/25/18
to MIT App Inventor Forum
Here is the AIA file
video_viewer.aia

Yossi Yaron

unread,
Jan 25, 2018, 5:38:12 AM1/25/18
to MIT App Inventor Forum
And another question - does the 1MB file size requirement hold for online / external files as well, or does it only apply for video files embedded within the application?

Chris Ward

unread,
Jan 25, 2018, 7:12:11 AM1/25/18
to mitappinv...@googlegroups.com
Hi Yossi

Respect for your perseverance!

Hard to say if it should work with Google Drive or not - it is essentially a "special data cloud" but accessing it from your own app might require some permissions inlined with the URL.

Farzeen has given a YouTube example in that post, so I would try to get that working first.

Edit: You will possibly need to get that manifest modification done too.....

In your Screen2 Properties Palette, you are pointing to a link and not the underlying video, so the video will not be loaded - as Farzeen has already explained.

Chris Ward

unread,
Jan 25, 2018, 7:33:24 AM1/25/18
to MIT App Inventor Forum
....Well, swapped-out your link with Farzeen's: https://videos.code.org/2015/social/president_obama_asks_america.mp4

Good news is that It works :) Without messing with the Manifest. (This is on the new nb166 AI Release)

....but the Video Player needs to be resized. You will see what I mean.

Yossi Yaron

unread,
Jan 25, 2018, 9:30:02 AM1/25/18
to MIT App Inventor Forum
Hi again Chris,
First of all I need to add some background: I am a computer sciences teacher. A deaf friend asked for a volunteer in developing an app for teaching sign language, which obviously requires a video viewing capability. One of my students has volunteered to develop it, but I do feel compelled to make sure this is indeed possible before assigning him for the project. 

As to your reply - thanks for narrowing it down. So the problem is with Google Drive.
Can you (or anyone) point me to a streaming video service that would work with MIT App Inventor?  

Thank you!
Yossi Yaron

Chris Ward

unread,
Jan 25, 2018, 12:45:05 PM1/25/18
to MIT App Inventor Forum
Hello Yossi

The problem was not Google Drive, though I imagine it could be a problem because of it's security. The problem was the use of a link to a video whereas the Video Player requires a full (direct) path.

Now that I have more understanding of what you wish to build, I am wondering why you think the app obviously requires a video viewing capability, because you could use images and if so, give the User control of how quickly/slowly they are displayed. 

Anyway, for your movies, one streaming service we know of that works is YouTube......
Reply all
Reply to author
Forward
0 new messages