There is one other way to play videos, through a browser panel element. Here is an example:
<abs contexttype="opengear" style="">
<browser height="200" left="26" top="23" url="video.html" width="400"/>
</abs>
You'll also need the video.html file, which points to the video. It looks like this:
<html>
<body style="margin:0px;padding:0px;background-color:#000000">
<video autoplay="true" style="position:absolute;top:0px;left:0px;width:100%;height:100%">
<source src="https://www.learningcontainer.com/wp-content/uploads/2020/05/sample-mp4-file.mp4?_=1" type="video/mp4"/>
</video>
</body>
</html>
My colleague also pointed me to this panel, which allows you to play youTube videos in a DashBoard.
<abs contexttype="opengear" id="_top" keepalive="false">
<meta>
<params>
<param access="1" constrainttype="INT_CHOICE" name="Playback" oid="Playback" precision="0" type="INT32" value="1" widget="toggle">
<constraint key="0">Play</constraint>
<constraint key="1">Play</constraint>
</param>
</params>
</meta>
<webget height="427" id="webget-player" left="136" top="89" width="666">
<html><!DOCTYPE html>
<html>
<body>
<!-- 1. The <iframe> (and video player) will replace this <div> tag. -->
<div id="player"></div>
<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// 3. This function creates an <iframe> (and YouTube player)
// after the API code downloads.
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '390',
width: '640',
videoId: 'LeoKlM0iBr4'
});
}
function playVideo()
{
player.playVideo();
}
function stopVideo()
{
player.stopVideo();
}
function pauseVideo()
{
player.pauseVideo();
}
</script>
</body>
</html></html>
</webget>
<param expand="true" height="68" left="135" oid="Playback" style="style:toggleButton;" top="519" width="667">
<task tasktype="ogscript">if (this.getValue() == 1)
{
ogscript.getComponentsById('webget-player')[0].callNoWait('playVideo', null);
}
else
{
ogscript.getComponentsById('webget-player')[0].callNoWait('pauseVideo', null);
}
</task>
</param>
</abs>
#DashBoard