Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does HMTL5 video autoplay work on Samsung Smart TV?

I'm trying to get an HTML5 video element to autoplay on a Samsung Smart TV (in the regular browser, not specifically as a TV app, if that makes any difference). Perhaps the autoplay element just doesn't work - I have tried all of the following.

autoplay="true"
autoplay="autoplay"
autoplay=autoplay

The video element will play fine manually (once you have managed to point the cursor on the incredibly tiny play control!)

Has anyone else got this to work?

like image 207
Liz Rice Avatar asked Nov 21 '25 07:11

Liz Rice


1 Answers

This should work:

<video id="video" src="movie.mp4" autoplay="autoplay" width="320" height="240">
Your browser does not support the video tag.
</video> 

At least the documentation says that: http://www.samsungdforum.com/upload_files/files/guide/data/html/html_2/reference/HTML%20Specification.html#HTML5%20and%20Samsung%20Smart%20TV%20SDK

If the autoplay attribute won't work, still you can start it using JavaScript. Just try to call the play() method:

var myVideo = document.getElementById("video");
myVideo.load();
myVideo.play();
like image 163
Adam Lukaszczyk Avatar answered Nov 22 '25 20:11

Adam Lukaszczyk