All,
TL;DR - I’m looking for help getting videos to display on Linux builds using native.showWebPopup() + HTML File + Video --OR-- A way to cancel/close a video shown with media.*
Background To Issue
I have been working with a client for a few years who is using Win32 builds for Arcade cabinets. These builds include a full screen video while the cabinet is idle.
Recently, he started a effort to switch to Linux to save on license costs. Almost everything is working great and we are really happy with the conversion. However…
We are having issues with the video. Specifically, we have not been able to get it to play.
What I Do Now
Currently I use ‘native.showWebPopup()’ to load a HTML file that then loads an MP4 video file and displays it.
This is great because we can close the video at any time via the cancelWebPopup() call. i.e. When users press buttons we skip the video.
If you want to see my code, you can see an example of what I am doing here (I will also post key code at the end of this post):
https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2019/06/videoTest.zip
What I Have Tried
To get this fixed I’ve tried:
- Alternate video codecs: 264, mpeg-4, mpeg-2, theora, 265, vp8.
- Installing additional support on the Linux system for video etc.
- media.playVideo() - Plays video, but can’t close video early as I need.
What I Need
I am hoping some here has this working already or has some insights. I’m basically looking for any help I can get all suggestions are welcome!
Pertinent Code (included in ZIP file above)
Call To showWebPopup
local options = { hasBackground=false, baseUrl=system.ResourceDirectory } native.showWebPopup( left, top, fullw, fullh, "localpage.html", options )
localpage.html
\<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"\> \<html xmlns="http://www.w3.org/1999/xhtml"\> \<head\> \<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /\> \<title\>Video Test\</title\> \<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/\> \<style type="text/css"\> body { background-color:transparent; } \</style\> \</head\> \<body\> \<video width="1900" height="1060" autoplay\> \<source src="video.mp4" type="video/mp4"\> Your browser does not support the video tag. \</video\> \</body\> \</html\>
build.settings
-- For more details on settings see these pages: -- -- https://docs.coronalabs.com/guide/distribution/buildSettings/index.html -- https://docs.coronalabs.com/guide/distribution/win32Build/index.html settings = { build = { neverStripDebugInfo = true }, orientation = { default = "landscapeRight", supported = { "landscapeRight", "landscapeLeft" }, }, window = { defaultMode = "normal", -- fullscreen, maximized, normal resizable = true, enableCloseButton = true, enableMaximizeButton = true, suspendWhenMinimized = false, defaultViewWidth = 960, defaultViewHeight = 540, minViewWidth = 480, minViewHeight = 270, titleText = { default = "Rowdy Raccoons", }, }, }