HTML5 Video Player
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 47
- Joined: Thu Jan 10, 2008 7:15 am
- Location: Redondo Beach, CA
- Contact:
HTML5 Video Player
I currently use revBrowser to play about 25 different short Flash (swf) videos in a CDROM app. The client hands the CDs out and mails them by the thousands, so compatibility on PC and Mac is crucial. With Flash being removed from many computers, they are worried too many people will no longer be able to play the videos.
I read at https://livecode.com/use-the-web-browser/ that LiveCode can play videos via HTML5 in the onboard browser. Does that mean I can replace the Flash videos with mp4's (supported by both PC and Mac) on the CD and play them through revBrowser? That would be wonderful! If so, before I reinvent the wheel, is there a recommended HTML5 player and LiveCode code starting point for this?
Thanks,
Steve
I read at https://livecode.com/use-the-web-browser/ that LiveCode can play videos via HTML5 in the onboard browser. Does that mean I can replace the Flash videos with mp4's (supported by both PC and Mac) on the CD and play them through revBrowser? That would be wonderful! If so, before I reinvent the wheel, is there a recommended HTML5 player and LiveCode code starting point for this?
Thanks,
Steve
Re: HTML5 Video Player
Hi Steve,
I don't think this is possible via the potential security concerns of local file access via a web browser. It is possible to play local videos but a user would have to physically select them via a file picker. More information on this here-
http://stackoverflow.com/questions/8885 ... -video-tag
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
I don't think this is possible via the potential security concerns of local file access via a web browser. It is possible to play local videos but a user would have to physically select them via a file picker. More information on this here-
http://stackoverflow.com/questions/8885 ... -video-tag
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
--
Re: HTML5 Video Player
Hi Steve,
why not used the player object? If it is only about simple playback of .mp4 files this would be fairly easy to implement. You probably have to check for the environment (MacOS or Windows) when opening the stack and then treat the playback slightly different depending on the environment. For the MacOS side there should be no problem at all, for Windows look this discussion, although it might be dated knowledge: http://forums.livecode.com/viewtopic.php?f=18&t=7653
Best
Oliver
why not used the player object? If it is only about simple playback of .mp4 files this would be fairly easy to implement. You probably have to check for the environment (MacOS or Windows) when opening the stack and then treat the playback slightly different depending on the environment. For the MacOS side there should be no problem at all, for Windows look this discussion, although it might be dated knowledge: http://forums.livecode.com/viewtopic.php?f=18&t=7653
Best
Oliver
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: HTML5 Video Player
What Oliver said. If you're already sending CDs there's no need to depend on the limitations of a browser. Build a LiveCode standalone and get a better true desktop experience (and with LC's flexibility once you get it set up you'll probably save production costs by being able to make tools that build your content faster than can be done for most web layouts).
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 47
- Joined: Thu Jan 10, 2008 7:15 am
- Location: Redondo Beach, CA
- Contact:
Re: HTML5 Video Player
I wish! Player objects in LiveCode support only QuickTime videos. Problem is, QT installed based on PCs (95% of computers) is questionable. Some say as QT installed base is as high as 80% or so because iTunes requires it and others think under 50%. For this promotional discs, users won't entertain having to install QT before they can play the videos. Looks like mp4 videos played on HTML5 video players is pretty much universally supported. I have code that does it and just trying to get LC to run it now, which I think is just me needing to figure out how.
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: HTML5 Video Player
Although LiveCode can be used on older Windows systems that may have QuickTime installed, QuickTime is not required for video playback.
What issues have you run into playing video on Windows without QuickTime?
What issues have you run into playing video on Windows without QuickTime?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 47
- Joined: Thu Jan 10, 2008 7:15 am
- Location: Redondo Beach, CA
- Contact:
Re: HTML5 Video Player
I need to play videos in a LC standalone on both Mac and PC, both the standalone and videos are on the same CD. I understood only QT video types could be played by LC, something about not having access to Window's video services to play them. Can I just play an mp4 in LC, positioned and sized where I like, that will run on PC and Mac? That would be wonderful.FourthWorld wrote:Although LiveCode can be used on older Windows systems that may have QuickTime installed, QuickTime is not required for video playback.
What issues have you run into playing video on Windows without QuickTime?
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: HTML5 Video Player
It may depend on the codec used, but give it a try.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: HTML5 Video Player
When I last checked, Windows doesn't ship with a codec for mp4 which is why it requires QT. That may have changed with Windows 10 but users with older versions will still need QT or will need to download and install the codec.
I agree that using a player control is the best alternative but the codec issue is a stickler. One solution might be to create two copies of each video, one in a Mac format and another in Windows native format, and play the correct file based on the current platform. Seems like overkill but it could work.
I agree that using a player control is the best alternative but the codec issue is a stickler. One solution might be to create two copies of each video, one in a Mac format and another in Windows native format, and play the correct file based on the current platform. Seems like overkill but it could work.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: HTML5 Video Player
Hi all,
if you install the LAVfilter package for WIndows, WMP (Windows Media Player) can play MP4 and a lot of other formats!
https://github.com/Nevcairiel/LAVFilters/releases
Give it a try, they are free and work fine!
Not sure if this will also work in a browser however.
Best
Klaus
if you install the LAVfilter package for WIndows, WMP (Windows Media Player) can play MP4 and a lot of other formats!
https://github.com/Nevcairiel/LAVFilters/releases
Give it a try, they are free and work fine!
Not sure if this will also work in a browser however.
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: HTML5 Video Player
Does every user have to install it, or can it be embedded in the app?Klaus wrote:if you install the LAVfilter package for WIndows, WMP (Windows Media Player) can play MP4 and a lot of other formats!
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 47
- Joined: Thu Jan 10, 2008 7:15 am
- Location: Redondo Beach, CA
- Contact:
Re: HTML5 Video Player
Tried on Windows 10 with mp4 and wmv. Both play when opened directly in Windows Media Player but neither play in LC. The mp4 does play in LC on the Mac. Must need QuickTime to use Player Object, as I think has been reported and speaks to less directly than is helpful in the manual.FourthWorld wrote:It may depend on the codec used, but give it a try.
Re: HTML5 Video Player
Hi Jaques,
But it is allowed to bundle it with your app.
Edit:
I fI remember correctly I used to check for the exitstence of this folder, which meant that LAVFilter
have been installed, but that was years ago on Win XP
...
put (there is a folder (specialfolderpath(38) & "/LAV Filters")) into tLAVInstalled
...
Best
Klaus
it needs to be installed, either by the user or by your/your app.jacque wrote:Does every user have to install it, or can it be embedded in the app?Klaus wrote:if you install the LAVfilter package for WIndows, WMP (Windows Media Player) can play MP4 and a lot of other formats!
But it is allowed to bundle it with your app.
Edit:
I fI remember correctly I used to check for the exitstence of this folder, which meant that LAVFilter
have been installed, but that was years ago on Win XP
...
put (there is a folder (specialfolderpath(38) & "/LAV Filters")) into tLAVInstalled
...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: HTML5 Video Player
That sounds like Windows has the right codecs installed now. Check the LC prefs and make sure that it isn't trying to load QT on startup. You want to force LC to use native Windows playback. Restart LC before trying again.Steve Collins wrote:Tried on Windows 10 with mp4 and wmv. Both play when opened directly in Windows Media Player but neither play in LC. The mp4 does play in LC on the Mac.
Also, to be safe, put this into a startup or preOpenStack handler in the stack:
Code: Select all
set the dontuseQT to true
If you have machines with older versions of Windows installed you should probably check to make sure they also have the right codecs.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 47
- Joined: Thu Jan 10, 2008 7:15 am
- Location: Redondo Beach, CA
- Contact:
Re: HTML5 Video Player
It was set to load QT. Will test without...jacque wrote:Check the LC prefs and make sure that it isn't trying to load QT on startup.Steve Collins wrote:Tried on Windows 10 with mp4 and wmv. Both play when opened directly in Windows Media Player but neither play in LC. The mp4 does play in LC on the Mac.
If you have machines with older versions of Windows installed you should probably check to make sure they also have the right codecs.
From what I have read, playing an mp4 in HTML5 is practically universal these days, because it relies on the browser engines to play them and they are all capable these days. I have an HTML5 page I wrote with just a handful of code that does that flawlessly when dropped onto a browser (calls player and file type with direct link to video on hard drive). When loading that page into revBrowserOpenCef, though, only the player loads with what appears to be a broken link icon in it. LC script:
put revBrowserOpenCef(the windowId of this stack, "file:///Users/stevecollins/Desktop/Player/TestHTML5Video.html") into tBrowserID
revBrowserSet tBrowserID, "rect", the rect of graphic "browserPlaceholder"
Neil Rogers posted in November that HTML5 video should play now this way in LC.
https://livecode.com/use-the-web-browser/
I was advised in a LC forum post that calling out a video file to play in a browser is prohibited, for security reasons. I think that is when performing it through an HTTP link that reached out to a remote users hard drive, not when both the page and video are hosted on the hard drive. Browsers can do it, why not LC? I'm concerned calling the page in LC is similar in function to the HTTP call, though, and thus the broken link. Supposedly you can load the video into a cache with HTML5 and reference the video from there, but I'm seriously in over my head trying to figure that out.
Anyone know how to call a HTML5 page that plays a video into LC browser and have it play like it does when dropped onto a browser? That would solve LC video disconnect in a very big way.
Thanks,
Steve