Page 1 of 1

Playing a Vimeo stream within an HTML field...

Posted: Tue Mar 26, 2013 12:29 pm
by PaulMaguire
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.

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

Posted: Tue Mar 26, 2013 2:16 pm
by Klaus
Hi Paul,

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


Best

Klaus

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

Posted: Tue Mar 26, 2013 4:36 pm
by PaulMaguire
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.

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

Posted: Wed Mar 27, 2013 11:35 am
by Klaus
vimeo1.jpg
vimeo1.jpg (41.42 KiB) Viewed 10580 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

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

Posted: Wed Mar 27, 2013 12:32 pm
by PaulMaguire
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)...

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

Posted: Wed Mar 27, 2013 1:54 pm
by Klaus
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

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

Posted: Wed Mar 27, 2013 4:06 pm
by PaulMaguire
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...

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

Posted: Sun Apr 28, 2013 3:29 am
by jpatten
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....?

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

Posted: Sun Apr 28, 2013 8:15 pm
by PaulMaguire
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.

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

Posted: Fri Aug 22, 2014 10:31 pm
by Appy777
Hi Paul,

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

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

Posted: Sat Aug 23, 2014 11:32 am
by Klaus
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