Play a movie from a website

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Play a movie from a website

Post by trags3 » Sat Jun 29, 2019 11:55 pm

I am attempting to have my app play a video clip. The clip is on a website & I have the URL. Do I need to download the clip or is there a way to play it without downloading the file first? The clip is stored on Vimeo.
Tom

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Play a movie from a website

Post by bogs » Sun Jun 30, 2019 4:47 am

What format is the video clip in? Is it a private video (i.e., you don't want someone else to see it for personal or commercial reasons), or is it a video that anyone can view, such as for testing out a handler? Is the app for desktop or mobile?

LiveCode, as far as I understand, treats any url as well as any other, local or on a server. If we are talking about the internal 'player' object, it should be as simple as somethingi like

Code: Select all

set the filename of player "My Player" to "SecondMovie.mov"
...on desktop.

On mobile, I think it would be something like

Code: Select all

play video "http://www.livecode.com/buildanapp.mp4"
... which plays whatever video you name full screen.

Both player and play video are in the dictionary as such.
Image

trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Re: Play a movie from a website

Post by trags3 » Mon Jul 01, 2019 12:42 am

Hi,
I have tried to follow the instructions from the following lesson:

http://lessons.livecode.com/m/4069/l/29 ... -on-mobile

The only difference in what I'm trying to do and what they do in the lesson is in the lesson the video file exists inside the app. I am trying to play a video located on a Vimeo server. I'm pretty sure this can be done but the Dictionary and the above-referenced lesson are not very clear to me as to exactly how.

Tom

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Play a movie from a website

Post by bogs » Mon Jul 01, 2019 4:54 am

Sorry, looks like that lesson is geared towards playing a video on mobile, for which I have no setup to test with nor any experience developing on.

Since it appears your talking about mobile, though, did you try that second listing from the dictionary? Or is it that you do not want the video to play full screen?

Hopefully someone that does work with mobile will chime in with a more solid answer for you though.
Image

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Play a movie from a website

Post by SparkOut » Mon Jul 01, 2019 7:59 am

I would have to wonder whether it is the platform/url target being the issue, as bogs asked at first.
If you try on a desktop PC and use a media player such as VLC or whatever, and give it the url, will it play? If we can ensure the url will feed the video directly (without being surrounded by the Vimeo web page) then we can go ahead with the mobile player code.

trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Re: Play a movie from a website

Post by trags3 » Mon Jul 01, 2019 1:13 pm

Thank You Bogs and Sparkout,
It appears that the Vimeo web page gets in the way.
Guess I'll need to include a couple of videos in the stack downloaded from Vimeo.
Thanks
Tom

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Play a movie from a website

Post by bogs » Mon Jul 01, 2019 2:57 pm

Well, looking at the embed link generated by Vimeo, it doesn't look like it goes directly to a file, but to a reference.

Curious, did you try using the browser widget to see if it plays in that? From what I saw in the link, it looks like you can set the size of the player just like the old days. If it plays in the browser widget, it might work well enough for your purposes.
Image

Post Reply

Return to “iOS Deployment”