侧边栏壁纸
  • 累计撰写 793 篇文章
  • 累计创建 1 个标签
  • 累计收到 1 条评论
标签搜索

目 录CONTENT

文章目录

Video

Dettan
2022-01-09 / 0 评论 / 0 点赞 / 99 阅读 / 267 字
温馨提示:
本文最后更新于 2022-07-23,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。
https://www.dandelioncloud.cn/article/details/1408818864858931202
https://videojs.com/



换源
let url = "http://cctvalih5ca.v.myalicdn.com/live/cctv2_2/index.m3u8"
player.src(url)
player.load(url)
player.ready(function () {
    this.play()
})

Demo
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link href="https://vjs.zencdn.net/7.15.4/video-js.css" rel="stylesheet" />
		<script src="https://vjs.zencdn.net/7.15.4/video.min.js"></script>
		<!-- If you'd like to support IE8 (for Video.js versions prior to v7) -->
		<!-- <script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script> -->
	</head>
	<body>
		<video id="my-player" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto"
			autoplay="autoplay" loop="true">
			<!--<source src="rtmp://mobliestream.c3tv.com:554/live/goodtv.sdp" >-->
			<source src="http://cctvalih5ca.v.myalicdn.com/live/cctv1_2/index.m3u8">
			<source src="http://krtxplay1.setrtmp.com/live/SSAC-387933-FDDCB.m3u8">
		</video>
		<script type="text/javascript">
			var player = videojs(document.querySelector('#my-player'));
		</script>
	</body>
</html>

0

评论区