Add VideoJS example to README.md
This commit is contained in:
parent
095f2c66e0
commit
c75a435610
24
README.md
24
README.md
|
@ -13,7 +13,7 @@
|
|||
|
||||
## Further setup
|
||||
- Customize privacy policy to your environment if you plan on hosting it publicly
|
||||
|
||||
- Set up player, example code below
|
||||
|
||||
## nginx-mod-rtmp example config
|
||||
|
||||
|
@ -110,3 +110,25 @@ KillMode=control-group
|
|||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
### VideoJS Player example code
|
||||
```
|
||||
<link href="https://unpkg.com/video.js/dist/video-js.min.css" rel="stylesheet" />
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<video id='hls-player' class="video-js vjs-default-skin vjs-big-play-centered" controls>
|
||||
<source type="application/x-mpegURL" src="https://cdn.zotan.stream/hls/<?php echo $_GET["profile"]."/".$_GET["stream"]; ?>.m3u8">
|
||||
</video>
|
||||
</div>
|
||||
<script src="https://unpkg.com/video.js/dist/video.min.js"></script>
|
||||
<script>
|
||||
var player = videojs('hls-player', {liveui: true});
|
||||
player.fill(true);
|
||||
</script>
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue