video.js + videojs-ptv
by pdxandi
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Video.js Basic Example</title>
<link href="//unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
<script src="//unpkg.com/video.js/dist/video.js"></script>
<script src="//unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script>
<script src="//unpkg.com/@ptv.js/videojs-ptv/dist/videojs-ptv.min.js"></script>
</head>
<body>
<video id="videojs-player" class="video-js vjs-default-skin vjs-big-play-centered" data-setup='{"fluid": true}' controls playsinline muted >
</video>
</body>
</html>
CSS
html,
body {
width: 100%;
height: 100%;
margin: 0;
background: #f0f0f0;
}
JavaScript
const player = videojs('videojs-player');
const config = {
channel: '5c701be7dc3d20080e4092f4',
stream: '5de7e7c2a6adde5211684519'
};
// Initialize SDK.
player.ptv(config);