Is it possible to play video from remote URL in App Inventor Classic or App Inventor 2?

11,245 views
Skip to first unread message

Dominik Chrástecký

unread,
Mar 1, 2014, 12:23:06 PM3/1/14
to mitappinv...@googlegroups.com
Hi,
I tried a lot of things to make this work, but I'm not sure if there's a way for it to be done.

I'm trying to play a 50MB video from an URL, but when I run the app, it just stops working.

Any help or ideas would be appreciated, thanks.

Enis

unread,
Mar 1, 2014, 12:29:17 PM3/1/14
to mitappinv...@googlegroups.com
Please post a screenshot of your relevant blocks so we can see what's happening.

Dominik Chrástecký

unread,
Mar 1, 2014, 12:42:12 PM3/1/14
to mitappinv...@googlegroups.com

Here it is, thanks.

Dne sobota, 1. března 2014 18:23:06 UTC+1 Dominik Chrástecký napsal(a):

Enis

unread,
Mar 1, 2014, 12:57:40 PM3/1/14
to
I believe this is happening because you're trying to show that video when the screen initializes and before it's finished  Try putting a button on the screen, trigger the video from there, then hide the button.


Dominik Chrástecký

unread,
Mar 1, 2014, 12:58:45 PM3/1/14
to mitappinv...@googlegroups.com
I will try it, when I will have a phone to test (probably tomorrow) and then I will write.
Thanks for advice.


Dne sobota, 1. března 2014 18:23:06 UTC+1 Dominik Chrástecký napsal(a):
Hi,

Enis

unread,
Mar 1, 2014, 1:00:45 PM3/1/14
to mitappinv...@googlegroups.com
You should be able to test with the Emulator!

Dominik Chrástecký

unread,
Mar 1, 2014, 1:03:24 PM3/1/14
to mitappinv...@googlegroups.com
I do not believe the emulator too much :)


Dne sobota, 1. března 2014 18:23:06 UTC+1 Dominik Chrástecký napsal(a):
Hi,

Enis

unread,
Mar 1, 2014, 1:11:24 PM3/1/14
to mitappinv...@googlegroups.com
If you can use the emulator, it should work with your app and your app should work on it... it just takes a while to load. 

If you want a faster emulator, check out http://wwwgenymotion.com.

Dominik Chrástecký

unread,
Mar 2, 2014, 7:33:13 AM3/2/14
to mitappinv...@googlegroups.com
So I tried it and it just does the same thing, but now when I click the play button.
After I click it the app stops working.


Dne sobota, 1. března 2014 18:23:06 UTC+1 Dominik Chrástecký napsal(a):
Hi,

Enis

unread,
Mar 8, 2014, 2:57:50 PM3/8/14
to mitappinv...@googlegroups.com
Did you get your video to play Dominik?

Hal Abelson

unread,
Jun 21, 2014, 10:07:06 AM6/21/14
to
[+ enis, powerusers]


Dominik,

You can use the videoplayer to play videos from over the web, but you need to set the videoplayer source to the URL for the actual file.
Most videos you see on the web are hidden behind player interfaces.   We'll see what we can do in making the
videoplayer smarter about this, but currently you have to give the player the URL for the actual file.

For example, the URL in your screenshot  is


That's a php interface, not the URL of a file.  If you play around (point a browser to that  php page) you'll find that the
URL for the actual file is

http://stream1.zkouknito.cz/40/40c4b63175af8c6b8d13611fec70c500_1393678873.mp4

If you use that as the source of the videoplayer, it will work.  Although the video took a long time to start when I tried it on my phone,.

Another thing you can do is to play the video with a Webviewer component.   The WebViewer browser is smart enough to use the php player, although you don't have the start and pause controls that you do with vodeoplayer.
(EDIT: this is not possible, see below!)

ANYONE:  Does anyone know a good source of actual URLs for streaming video files on the web (not hidden behind players)?

== Hal

Taifun

unread,
Mar 9, 2014, 2:02:53 PM3/9/14
to AIPowe...@googlegroups.com, mitappinv...@googlegroups.com, aipowe...@googlegroups.com, Enis Moran
Another thing you can do is to play the video with a Webviewer component.   The WebViewer browser is smart enough to use the php player, although you don't have the start and pause controls that you do with vodeoplayer.
I always thought, the webviewer can't play videos?
I now tried that link http://46.28.110.83/hokageapp/nejnovejsi.php in the webviewer and I can hear
audio, but there is no video displayed (using Nexus 5 running Android 4.2.2)?
(see attachment)
Taifun

video.aia

Hal Abelson

unread,
Mar 9, 2014, 4:23:19 PM3/9/14
to mitappinv...@googlegroups.com, AIPowe...@googlegroups.com, aipowe...@googlegroups.com, Enis Moran
Taifun,

You're correct (as usual).   I thought I was seeing the video in webviewer when I tested it before, but looking at it now, I guess I was mistaken.   I hear the audio, but no video.   I do see the video with the videoplayer, and he actual file URL.

Dominik Chrástecký

unread,
Mar 9, 2014, 5:16:21 PM3/9/14
to mitappinv...@googlegroups.com
Hi, I did not make the video to work, everything that you have written is true - the webviewer plays only audio, I also tried the HTML5 video tag, it's the same as only the webviewer. The reason why i use php is that I need to change the source every week, but I think it should not be a problem, because the php automatically redirects it to the right source whatever the app is using it (because it's server side, not client side, so every client will accept it). The strange thing is that when I put the file to Player (audio) then the video is played allright (but only sound, not the video).


Dne sobota, 1. března 2014 18:23:06 UTC+1 Dominik Chrástecký napsal(a):
Hi,

Scott Ferguson

unread,
Mar 9, 2014, 10:13:04 PM3/9/14
to AIPowe...@googlegroups.com, mitappinv...@googlegroups.com, aipowe...@googlegroups.com, Enis Moran
I don't have any sources in particular for videos, but the techniques at this site might be of help in getting the url of videos: http://all-streaming-media.com/faq/recording-media-stream/faq-get-media-stream-URL.htm
I have tinkered in the past with extracting live feed video urls from xml containers by downloading the containers then opening them to copy out the urls contained within.
---
Scott


On Sunday, March 9, 2014 12:39:37 PM UTC-5, Hal Abelson wrote:
[+ enis, powerusers]


Dominik,

You can use the videoplayer to play videos from over the web, but you need to set the videoplayer source to the URL for the actual file.
Most videos you see on the web are hidden behind player interfaces.   We'll see what we can do in making the
videoplayer smarter about this, but currently you have to give the player the URL for the actual file.

For example, the URL in your screenshot  is


That's a php interface, not the URL of a file.  If you play around (point a browser to that  php page) you'll find that the
URL for the actual file is

http://stream1.zkouknito.cz/40/40c4b63175af8c6b8d13611fec70c500_1393678873.mp4

If you use that as the source of the videoplayer, it will work.  Although the video took a long time to start when I tried it on my phone,.

Another thing you can do is to play the video with a Webviewer component.   The WebViewer browser is smart enough to use the php player, although you don't have the start and pause controls that you do with vodeoplayer.

ANYONE:  Does anyone know a good source of actual URLs for streaming video files on the web (not hidden behind players)?

== Hal


On Sunday, March 2, 2014 7:33:13 AM UTC-5, Dominik Chrástecký wrote:

J Havok

unread,
Mar 31, 2015, 4:42:18 PM3/31/15
to mitappinv...@googlegroups.com
Did this end up working for you????

Dominik Chrástecký

unread,
Apr 1, 2015, 4:21:14 AM4/1/15
to mitappinv...@googlegroups.com
Nope, I gave up

Hal (please do not assign issues here)

unread,
Apr 1, 2015, 9:11:09 AM4/1/15
to mitappinv...@googlegroups.com
I just checked what I wrote in my message of March 9.  It looks like the video URL I referenced there:


Is now a dead link.  See if you can find a URL to another MP4 (they can be hard to find).  
Remember that it needs to be a link to the actual streaming mp4, not to a player.

Altenatively, you can play the video with the Webviewer component.

Or is this is a Youtube video, you can play this using the activity starter, as shown in the activity starter documentation.

Taifun

unread,
Apr 1, 2015, 9:54:51 AM4/1/15
to mitappinv...@googlegroups.com
Altenatively, you can play the video with the Webviewer component.
@Hal: unfortunately not, we already talked about that earlier in this thread, see again here https://groups.google.com/d/msg/mitappinventortest/8ATSTdf8_n4/FASq5Ius6gUJ
there is only the video player solution or the activity starter solution currently
Taifun

J Havok

unread,
Apr 2, 2015, 12:21:36 AM4/2/15
to mitappinv...@googlegroups.com
I've been busy lately with school, but I will figure it out. Tomorrow after school/work I'm going to try a url extracting program for streaming videos. I'm currently making an app for my county that includes multiple traffic cams/fire station radio/ Facebook forums and more.

Talk to you soon!

-Jhavok
Reply all
Reply to author
Forward
0 new messages