Start a new topic

HTML 5 video player within an HTML Drawable

HTML 5 video player within an HTML Drawable


I have been trying to see if this would work by using LeanBack player and trying to get a video to load using an HTML5 only video player. Is it even possible to do something like this or am I just doing it wrong?

ARWorld.html

 

 Blah.htmlDrawable = new AR.HtmlDrawable({uri:"http://xxx.xxxx.com/xxx/xxx/xxxx/test.html"}, 5, {enabled: true, viewportWidth: 512, scale:1, updateRate:AR.HtmlDrawable.UPDATE_RATE.STATIC, clickThroughEnabled: true});

 

test.html

 

 

<html>

<head>

<title>

</title>

<meta name="viewport" content="target-densitydpi=device-dpi, width = 512, user-scalable = 0">

<link rel="stylesheet" media="screen" type="text/css" href="js.css/leanbackPlayer.default.css" />

<script type="text/javascript" src="js.player/leanbackPlayer.pack.js"></script>

<script type="text/javascript" src="js.player/leanbackPlayer.en.js"></script>

<script type="text/javascript" src="js.player/leanbackPlayer.de.js"></script>

</head>

<body class="custom">

<div class="leanback-player-video">

<video width="640" height="360" preload="none" autoplay controls>

<source src="http://xxx.xxx.com/xxxxxx/xxxx/video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />

</video>

</div>

</body>

</html>

Ok I realized UPDATE_RATE.STATIC should be set to UPDATE_RATE.LOW (setting it to HIGH caused some jitters)

You are trying something very interesting, although I have my doubts that it works sufficiently well. Setting update rate to anything else than static is currently not suggested as it results in frame rate jiggers (similar to what you experienced when setting it to HIGH, but less frequent on LOW). Additionally the framerate for playing the video inside the HtmlDrawable will be low and therefore I doubt that it gives a good user experience.

We do have video on the roadmap but I don't have any details to share at the moment.

Is it possible to even do this, cause I have been trying the same thing with another HTML5 palyer to no avail.?

Since you are able to use standard HTML 5 it might be possible. BUT it won't work sufficiently well. We have not tested it so I cannot even garantee that you will see frame from the embedded video.
Login or Signup to post a comment