HTML5 Video Player

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Thu Feb 25, 2016 12:26 am

jacque wrote:It works on my Mac and I see your web page using the CEF browser, but I didn't try in Windows. If you have the same experience (works on Mac, not on Windows) then I think it's time for a bug report.
I can't get it to work on my Mac. PowerBook late 2009 running El Capitan, LC 7.1.1.

Wait! Just got it to work by replacing rect of the graphic browserPlaceholder with "the rect of this window." hmm.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7239
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: HTML5 Video Player

Post by jacque » Thu Feb 25, 2016 1:21 am

What's the size of your graphic? My test stack uses a graphic 562x736 which works. That's just a random size I dragged out.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Thu Feb 25, 2016 5:39 pm

jacque wrote:What's the size of your graphic? My test stack uses a graphic 562x736 which works. That's just a random size I dragged out.
Graphic is 760x430, for no reason, which is now working. Must have been overworking Mac and just could not load the few times I tried before.

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Thu Feb 25, 2016 9:00 pm

> Microsoft Edge (codename "Spartan") is a web browser developed by Microsoft and included in the company's Windows 10 operating systems, replacing Internet Explorer as the default web browser on all device classes.

Double clicking my HTML page that plays the video opens Edge and plays video fine. When forcing to open in IE, always get "Internet Explorer restricted this webpage from running scripts or ActiveX controls." If I click allow in the button provided, it plays fine. Any idea what part of the HTML is promoting this restriction? I assume it's the security feature I read about that prevents browser from playing video without user selecting it. Interesting the newer browser, Edge, is fine with it.

<!DOCTYPE html>
<html>
<body>
<p><video width=”320″ height=”240″ controls>
<source src="TestVideo.mp4" type="video/mp4">
<source src=”TestVideo.ogg” type=”video/ogg”>
Your browser does not support the video tag. </video>
</p>
<p>
</p>
</body>
</html>

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Fri Feb 26, 2016 1:33 am

Looks like LC is dropping h264 and going just with Ogg and WebM with their browser? Can check LC's browsers here http://html5test.com.

Codecs supported by "revBrowserOpenCef" on Mac and Windows 10, LiveCode 8
MPEG-4 ASP support No ✘
H.264 support No ✘
Ogg Theora support Yes ✔
WebM with VP8 support Yes ✔
WebM with VP9 support Yes ✔

Codecs supported by "revBrowserOpen" on Mac, LiveCode 7.1.1
MPEG-4 ASP support Yes ✔
H.264 support Yes ✔
Ogg Theora support No ✘
WebM with VP8 support No ✘
WebM with VP9 support No ✘

Codecs supported by "revBrowserOpen" on Windows 10, LiveCode 7.1.1
MPEG-4 ASP support No ✘
H.264 support No ✘
Ogg Theora support Yes ✔
WebM with VP8 support Yes ✔
WebM with VP9 support Yes ✔
Last edited by Steve Collins on Fri Feb 26, 2016 7:52 am, edited 1 time in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: HTML5 Video Player

Post by FourthWorld » Fri Feb 26, 2016 2:42 am

Steve Collins wrote:Looks like LC is dropping h264 and going just with Ogg and WebM with their browser?
LC doesn't make a browser, so they have no decision-making authority on this.

LiveCode's CEF implementation uses the Chromium Embedded Framework browser. H.264 is encumbered by a patent pool and many uses case require multi-million-dollar patent royalties (for example, very few users of Final Cut Pro read the EULA which restricts use of that product, despite its name, to non-commercial use, thus avoiding patent licensing fees which would drive up the price point of the software).

I did a quick search for "CEF browser h.264" and turned up this article explaining that for that open source project they only support open source codecs:
https://code.google.com/archive/p/chrom ... issues/371

Comment #8 there provides a workaround for self-installing proprietary codecs, which is okay for individuals to do for personal use but if your objective is a commercial deployment then I'd guess unusual additional installations wouldn't be an ideal customer experience for your users.

You could always license H.264 directly from the patent pool:
http://www.mpegla.com/main/programs/AVC/Pages/FAQ.aspx

FWIW, general background on h.264 patents:
http://www.zdnet.com/article/a-closer-l ... -licenses/
http://www.engadget.com/2010/05/04/know ... g-and-you/

Forgive me if you'd mentioned this before and I missed it, but was there some reason the non-CEF browser wasn't working for you? if you use the non-CEF browser you should be able to take advantage of Microsoft's and Apple's existing royalty arrangements which allow their browser engines to use H.264.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Fri Feb 26, 2016 4:32 am

FourthWorld wrote:
Steve Collins wrote:Looks like LC is dropping h264 and going just with Ogg and WebM with their browser?
LC doesn't make a browser, so they have no decision-making authority on this.

Forgive me if you'd mentioned this before and I missed it, but was there some reason the non-CEF browser wasn't working for you? if you use the non-CEF browser you should be able to take advantage of Microsoft's and Apple's existing royalty arrangements which allow their browser engines to use H.264.
LC must have a browser on board they borrow? The above results are different from the browsers on their own on their respective machines.

I can't get an mp4 to run on the LC browser on a PC, whether non-CEF or CEF and whether LC 7.1.1 or 8.0, and the latter do have different browser results.

I'm really hurting for anyway any how to play an mp4 video with LC within its window. Actually, I really don't care what codec, as long as it compresses slim like h.264 and Flash (but isn't flash). I have to stop using flash on this app for security/playability reasons. I'm currently experimenting with the OGG and WebM videos. The above LC browser results would indicate h.264 is not supported in LC, surprisingly.

Regarding buying the mp4 license, looks like you need to edit underpinnings of the onboard Chromium browser. Can we edit the one in LC?

Thanks,
Steve

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Fri Feb 26, 2016 5:27 am

Hey! Webm video works on PC and Mac, LC 7.1.1. Guess that's the benefit of chasing down the fine details for days, particularly the HTML5test.com results showing what video formats LC's revBrowserOpenCef (Chromium browser) supports. LC's browsers, non-CEF and CEF, do not support h.264 (mp4) video except the non-CEF version on Mac. If you need to go PC and Mac, it has to be webm video, best I can tell.

LC script:

put revBrowserOpenCef(the windowId of this stack, tPath) into tBrowserID
revBrowserSet tBrowserID, "rect", the rect of graphic "browserPlaceholder"

HTML file (with autoplay video):

<!DOCTYPE html>
<html>
<body>
<p><video autoplay controls>
<source src="small.webm" type="video/webm" />
Your browser does not support the video tag. </video>
</p>
<p>
</p>
</body>
</html>

Get a "free" (small donation) Mac WebM encoder/converter here http://www.mirovideoconverter.com/download_osx.html

Turns out WebM VP-8 is comparable in quality and file size to h.264 and is royalty free, and VP-9 (also supported with LC's browser) is expected to be better than the forthcoming h.265.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: HTML5 Video Player

Post by FourthWorld » Fri Feb 26, 2016 5:08 pm

Steve Collins wrote:I can't get an mp4 to run on the LC browser on a PC, whether non-CEF or CEF and whether LC 7.1.1 or 8.0, and the latter do have different browser results.
Does the same HTML with the same video work in IE?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Fri Feb 26, 2016 6:13 pm

FourthWorld wrote:
Steve Collins wrote:I can't get an mp4 to run on the LC browser on a PC, whether non-CEF or CEF and whether LC 7.1.1 or 8.0, and the latter do have different browser results.
Does the same HTML with the same video work in IE?
No it does not. Same old failed notice when opened in IE, Windows 10.

I'm finally wrapping my mind around the fact that LC has its own platform for HTML, regardless of the environment, when using the revBrowserOpenCef browser. If the machine can play LC 7.1.1, I think that means it will play my WebM videos.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7239
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: HTML5 Video Player

Post by jacque » Fri Feb 26, 2016 6:59 pm

Wow, what a journey. You've saved the rest of us a lot of trouble. Thanks for the research.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: HTML5 Video Player

Post by FourthWorld » Fri Feb 26, 2016 7:31 pm

Steve Collins wrote:
FourthWorld wrote:
Steve Collins wrote:I can't get an mp4 to run on the LC browser on a PC, whether non-CEF or CEF and whether LC 7.1.1 or 8.0, and the latter do have different browser results.
Does the same HTML with the same video work in IE?
No it does not. Same old failed notice when opened in IE, Windows 10.

I'm finally wrapping my mind around the fact that LC has its own platform for HTML, regardless of the environment, when using the revBrowserOpenCef browser. If the machine can play LC 7.1.1, I think that means it will play my WebM videos.
It's true that LC is using the CEF browser engine rather than the OS-provided one when using revBrowserCEF.

My question about mp4 playback in the OS-provided browser was to find out whether that engine can play that format. Seems odd that it can't. Could it be that IE expects different tags or attributes for playing MP4?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Fri Feb 26, 2016 9:51 pm

FourthWorld wrote:
My question about mp4 playback in the OS-provided browser was to find out whether that engine can play that format. Seems odd that it can't. Could it be that IE expects different tags or attributes for playing MP4?
I was able to get an mp4 to play on PC and Mac when the HTML file was opened directly and on Mac in the non-CEF through LV. Windows 10 liked it, but it had to load in their new browser Edge. Oddly, I think IE is their default engine, which would explain why the non-CEF LC browser could not play it. When directly played on IE, you get a warning and then have to click a button in the window to allow it to play (I assume a security issue), which warning and button were not provided in the LC browser.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: HTML5 Video Player

Post by FourthWorld » Fri Feb 26, 2016 11:08 pm

Steve Collins wrote:When directly played on IE, you get a warning and then have to click a button in the window to allow it to play (I assume a security issue), which warning and button were not provided in the LC browser.
Warning? Sounds possibly relevant. What did it say?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Steve Collins
Posts: 47
Joined: Thu Jan 10, 2008 7:15 am
Location: Redondo Beach, CA
Contact:

Re: HTML5 Video Player

Post by Steve Collins » Sat Feb 27, 2016 6:53 am

FourthWorld wrote:
Steve Collins wrote:When directly played on IE, you get a warning and then have to click a button in the window to allow it to play (I assume a security issue), which warning and button were not provided in the LC browser.
Warning? Sounds possibly relevant. What did it say?

It says "Internet Explorer restricted this webpage from running scripts or ActiveX controls." to the right of that it gives a button you can click to allow it, then it runs. It affected only that one instance. Reloading the HTML file in IE, you have to click the allow button again.

Steve

Post Reply

Return to “Multimedia”