Playing a Vimeo stream within an HTML field...

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
PaulMaguire
Posts: 44
Joined: Wed Feb 13, 2013 3:38 pm
Contact:

Playing a Vimeo stream within an HTML field...

Post by PaulMaguire » Tue Mar 26, 2013 12:29 pm

Hi again.

I am using the UIWebView native control and displaying a local HTML file which contains a link to a video stream on Vimeo e.g:

Code: Select all

<iframe id="video" src="http://player.vimeo.com/video/42119140"></iframe>
In the simulator (and assuming iOS) this displays the first frame of the video and a player icon. I click to play and it fails (the app quits).

Is this possible? Should I be trapping the call to play a Vimeo stream and doing things a different way? What the best iOS/Android approach here? Wisdom appreciated.

Kind regards, Paul.

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Playing a Vimeo stream within an HTML field...

Post by Klaus » Tue Mar 26, 2013 2:16 pm

Hi Paul,

VIMEO uses FLASH to play videos, so this will not work on iOS!
No idea about Android however.


Best

Klaus

PaulMaguire
Posts: 44
Joined: Wed Feb 13, 2013 3:38 pm
Contact:

Re: Playing a Vimeo stream within an HTML field...

Post by PaulMaguire » Tue Mar 26, 2013 4:36 pm

Hi again Klaus.

When I put in the URL above I get a full-width browser player. Right-click on this Mac it and it's not Flash - it's HTML5. I can play it through my iPhone. So is playing Vimeo through Livecode native browser control not possible?

Kind regards, Paul.

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Playing a Vimeo stream within an HTML field...

Post by Klaus » Wed Mar 27, 2013 11:35 am

vimeo1.jpg
vimeo1.jpg (41.42 KiB) Viewed 10564 times
Hi Paul,

hm, when I open that url and right-click on my Mac this IS in fact a Flash player!?
See last line of my screenshot.


Best

Klaus

PaulMaguire
Posts: 44
Joined: Wed Feb 13, 2013 3:38 pm
Contact:

Re: Playing a Vimeo stream within an HTML field...

Post by PaulMaguire » Wed Mar 27, 2013 12:32 pm

Aha!

It seems to be due to Vimeo personal settings. I set my default player to be HTML5 in Vimeo some time ago and it must have stored this preference locally. Hm. I can't see how I can be in control of this.

Isn't this a common task? Playing video from services like YouTube and Vimeo, from within an native web scroller, within Livecode? When I view Vimeo videos on my iPhone all seems well and it plays just fine (i.e.. no Flash player balk)...

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Playing a Vimeo stream within an HTML field...

Post by Klaus » Wed Mar 27, 2013 1:54 pm

Hi Paul,

since I do not often visit VIMEO, FLASH seems to be the default setting there.

But sorry, I do not develop for mobile, so I cannot answer your question sufficiently.
I think when Android or iOs is calling VIMEO there will be a "browser switch" which
will "serve" the right video format for the platform. Know what I mean?

I would navigate to that video using you iPhone or something and check the url if possible.
Edit:
Oops, sorry overlooked your last sentence, just check the URL on your iPhone, maybe that will help
to solve the problem.


Best

Klaus

PaulMaguire
Posts: 44
Joined: Wed Feb 13, 2013 3:38 pm
Contact:

Re: Playing a Vimeo stream within an HTML field...

Post by PaulMaguire » Wed Mar 27, 2013 4:06 pm

Klaus wrote:I think when Android or iOs is calling VIMEO there will be a "browser switch" which
will "serve" the right video format for the platform. Know what I mean?
Yes! The problem is that what is being served to the LIvecode web native controller doesn't seem to work - it causes my app to crash to home screen in iOS. I would have though that this would be a common issue. The only previous post I can find on it is http://forums.runrev.com/viewtopic.php?t=7542.

The workarounds I can think of are:
1) detect URL launch, scan for "vimeo" in URL, and launchURL to open iOS/Android broswer and play (but this will leave my app)
2) detect URL launch, scan for "vimeo" in URL, get served code back from server and hack out the mp4 URL from it, stream this in a player object.
Both are quite ugly and fragile hacks...

jpatten
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 45
Joined: Tue May 06, 2008 11:24 pm

Re: Playing a Vimeo stream within an HTML field...

Post by jpatten » Sun Apr 28, 2013 3:29 am

I just discovered this as to be the case trying to play a Youtube video on a browser object too... The video url plays fine in the iPad in Safari, same address within a browser object and the app crashes as you've mentioned.

Not sure if this has been logged as a bug or not....?

PaulMaguire
Posts: 44
Joined: Wed Feb 13, 2013 3:38 pm
Contact:

Re: Playing a Vimeo stream within an HTML field...

Post by PaulMaguire » Sun Apr 28, 2013 8:15 pm

Hi.

Just as an update - it seems to work on actual iOS devices - it just fails in the simulator. However I notice it fails on the 6.1 simulator but not the 5.1 simulator. I think this may be already recognised as a bug in the 6.1 simulator but I can't be sure.

Note too the detail in setting up the native browser control:
delayRequests read/write
Set to true to cause the loadRequest message to be sent.
Note that in this mode, web-pages that trigger sub-document loads
(such as those containing iframes) will not load correctly.
Hope this is helpful.

KInd regards, Paul.

Appy777
Posts: 42
Joined: Fri Aug 22, 2014 10:14 pm

Re: Playing a Vimeo stream within an HTML field...

Post by Appy777 » Fri Aug 22, 2014 10:31 pm

Hi Paul,

Was there a solution to this? I need to stream videos from Vimeo in an app I am building.

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Playing a Vimeo stream within an HTML field...

Post by Klaus » Sat Aug 23, 2014 11:32 am

Hi Appy,

I think it is a better idea to start a new thread than to try to revive old and dead ones :D


Best

Klaus

Post Reply