Playing Videos In Linux Builds - Stumped

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", }, }, }

If you open that video file directly in a browser on that same device, does it play?

That is a good question.  I’ll ask my client.  We are separated geographically so he has to do the ‘on final hardware’ testing.

I’d guess that you need to install the win32 codecs. They’re not generally includes by default with gnu distributions because of their proprietary licenses, but all distributions include them in the repo for installation.

Thank Richard.

No luck with the installation of the win32 codecs, any other suggestions or thoughts?

Hmm. Could it be the baseUrl=system.ResourceDirectory that’s not working? Perhaps worth some debug prints to see where that actually points to, and then checking that the user which this app is running as has access perms there. Access perms on Linux can be tricky for people more used to Windows because softwares take on the access perms of the user running them, unlike Windows where everything is installed under an admin role. It can be particularly complex with SELinux based distributions. https://selinuxproject.org/page/Main_Page

Could also be a Corona bug. Linux support is still beta I believe, and I recall having trouble with earlier HTML5 support where some of these resource directories returned null instead of actual paths.

If you open that video file directly in a browser on that same device, does it play?

That is a good question.  I’ll ask my client.  We are separated geographically so he has to do the ‘on final hardware’ testing.

I’d guess that you need to install the win32 codecs. They’re not generally includes by default with gnu distributions because of their proprietary licenses, but all distributions include them in the repo for installation.

Thank Richard.

No luck with the installation of the win32 codecs, any other suggestions or thoughts?

Hmm. Could it be the baseUrl=system.ResourceDirectory that’s not working? Perhaps worth some debug prints to see where that actually points to, and then checking that the user which this app is running as has access perms there. Access perms on Linux can be tricky for people more used to Windows because softwares take on the access perms of the user running them, unlike Windows where everything is installed under an admin role. It can be particularly complex with SELinux based distributions. https://selinuxproject.org/page/Main_Page

Could also be a Corona bug. Linux support is still beta I believe, and I recall having trouble with earlier HTML5 support where some of these resource directories returned null instead of actual paths.