HMTL5视频自动播放是否适用于三星智能电视? [英] Does HMTL5 video autoplay work on Samsung Smart TV?

查看:244
本文介绍了HMTL5视频自动播放是否适用于三星智能电视?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在三星智能电视上播放HTML5视频元素(在常规浏览器中,不是专门用作电视应用,如果这有任何区别)。也许autoplay元素不起作用 - 我已经尝试了以下所有内容。

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?

推荐答案

这应该有效:

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

至少文件说:
http://www.samsungdforum .com / upload_files / files / guide / data / html / html_2 / reference / HTML%20Specification.html#HTML5%20and%20Samsung%20Smart%20TV%20SDK

如果autoplay属性不起作用,您仍然可以使用JavaScript启动它。只是尝试调用 play()方法:

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();

这篇关于HMTL5视频自动播放是否适用于三星智能电视?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆