-
Beta Was this translation helpful? Give feedback.
Answered by
yibei333
Dec 12, 2023
Replies: 1 comment
-
1.使用内置的xgplayer-hls插件<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui">
<meta name="referrer" content="no-referrer">
<link rel="stylesheet" href="https://unpkg.byted-static.com/xgplayer/3.0.10/dist/index.min.css">
<script src="https://unpkg.byted-static.com/xgplayer/3.0.10/dist/index.min.js" charset="utf-8"></script>
<script src="https://unpkg.byted-static.com/xgplayer-hls/3.0.10/dist/index.min.js" charset="utf-8"></script>
</head>
<body>
<div id="mse"></div>
<script>
let player = new window.Player({
id: 'mse',
url: 'http://localhost:19090/demo.m3u8',
autoplay: true,
playsinline: true,
height: window.innerHeight,
width: window.innerWidth,
plugins: [window.HlsPlayer],
hls: {
fetchOptions: {
headers: {
"aa": "bb",
},
}
}
});
</script>
</body>
</html> 2.使用第三方插件xgplayer-hls.js
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yibei333
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.使用内置的xgplayer-hls插件