Added basic video player, that uses playerjs library (HLS streaming doesn't work well with normal video tag)
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
hls
|
||||||
19
templates/video.html
Normal file
19
templates/video.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block main_content %}
|
||||||
|
<link href="http://vjs.zencdn.net/6.2.8/video-js.css" rel="stylesheet">
|
||||||
|
<body>
|
||||||
|
<video id="player" class="video-js vjs-default-skin" controls preload>
|
||||||
|
<source src="/hls/stream.m3u8" type="application/x-mpegURL">
|
||||||
|
</video>
|
||||||
|
<script src="http://vjs.zencdn.net/6.2.8/video.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.4.0/videojs-contrib-hls.min.js"></script>
|
||||||
|
<script>
|
||||||
|
var player = videojs('player', {width: 1280, height: 720});
|
||||||
|
player.play();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user