Skip to content

Instantly share code, notes, and snippets.

@ychakiris
Created May 31, 2018 23:55
Show Gist options
  • Save ychakiris/06fe52ac919e8600291d5adc26fc3c33 to your computer and use it in GitHub Desktop.
Save ychakiris/06fe52ac919e8600291d5adc26fc3c33 to your computer and use it in GitHub Desktop.
videojs-contrib-hls embed // source http://jsbin.com/remusiw
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>videojs-contrib-hls embed</title>
<!--
Uses the latest versions of video.js and videojs-contrib-hls.
To use specific versions, please change the URLs to the form:
<link href="https://unpkg.com/video.js@5.16.0/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@5.16.0/dist/video.js"></script>
<script src="https://unpkg.com/videojs-contrib-hls@4.1.1/dist/videojs-contrib-hls.js"></script>
-->
<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js/dist/video.js"></script>
<script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script>
<script src="http://cdn.sc.gl/videojs-hotkeys/0.2/videojs.hotkeys.js"></script>
</head>
<body>
<h1>Video.js Example Embed</h1>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="268" data-setup='{}'>
<source src="http://localhost:8080/video/output-1.mp4/index.m3u8" type="application/x-mpegURL">
</video>
<script>
videojs('my_video_1').ready(function() {
this.hotkeys({
volumeStep: 0.1,
seekStep: 20,
enableModifiersForNumbers: false
});
});
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>videojs-contrib-hls embed</title>
<\!--
Uses the latest versions of video.js and videojs-contrib-hls.
To use specific versions, please change the URLs to the form:
<link href="https://unpkg.com/video.js@5.16.0/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@5.16.0/dist/video.js"><\/script>
<script src="https://unpkg.com/videojs-contrib-hls@4.1.1/dist/videojs-contrib-hls.js"><\/script>
-->
<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js/dist/video.js"><\/script>
<script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"><\/script>
<script src="//cdn.sc.gl/videojs-hotkeys/0.2/videojs.hotkeys.js"><\/script>
</head>
<body>
<h1>Video.js Example Embed</h1>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="268" data-setup='{}'>
<source src="http://localhost:8080/video/output-1.mp4/index.m3u8" type="application/x-mpegURL">
</video>
<script>
videojs('my_video_1').ready(function() {
this.hotkeys({
volumeStep: 0.1,
seekStep: 20,
enableModifiersForNumbers: false
});
});
<\/script>
</body>
</html></script>
</body>
</html>
@tangzhongliang
Copy link

The code is not available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment