You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
901 B
34 lines
901 B
5 years ago
|
---
|
||
|
title: Live
|
||
|
description: Livestream
|
||
|
#date: 2020-05-04
|
||
|
license: All rights reserved
|
||
|
---
|
||
|
|
||
|
<script type="text/javascript" src="/js/clappr.min.js"></script>
|
||
|
<div class="embed-responsive embed-responsive-16by9">
|
||
|
<div class="embed-responsive-item" id="player"></div>
|
||
|
</div>
|
||
|
<script>
|
||
|
var player = new Clappr.Player({
|
||
|
source: "https://h3ndrik.de/hls/test.m3u8",
|
||
|
parentId: "#player",
|
||
|
language: 'de-DE',
|
||
|
poster: 'player.jpg',
|
||
|
//width: '100%',
|
||
|
//height: 'auto',
|
||
|
actualLiveTime: true,
|
||
|
autoPlay: true,
|
||
|
});
|
||
|
|
||
|
function resizePlayer(){
|
||
|
var aspectRatio = 16/9;
|
||
|
var newWidth = document.getElementById('player').parentElement.offsetWidth;
|
||
|
var newHeight = Math.round(newWidth / aspectRatio);
|
||
|
player.resize({width: newWidth, height: newHeight});
|
||
|
}
|
||
|
|
||
|
resizePlayer();
|
||
|
window.onresize = resizePlayer;
|
||
|
</script>
|