Browse Source

Fix missing poster in the player. Closes #29

pull/27/head
Gabe Kangas 5 years ago
parent
commit
5dffaf215b
  1. 2
      webroot/index.html
  2. 2
      webroot/js/player/player.js

2
webroot/index.html

@ -75,7 +75,7 @@ GW TODO: @@ -75,7 +75,7 @@ GW TODO:
autoplay
playsinline
muted
poster="https://goth.land/thumbnail.jpg"
poster="/thumbnail.jpg"
>
</video>
</div>

2
webroot/js/player/player.js

@ -6,7 +6,6 @@ window.VIDEOJS_NO_DYNAMIC_STYLE = true; @@ -6,7 +6,6 @@ window.VIDEOJS_NO_DYNAMIC_STYLE = true;
// Create the player for the first time
const player = videojs('video', null, function () {
player.poster('/thumbnail.jpg');
getStatus();
setInterval(getStatus, 5000);
setupPlayerEventHandlers();
@ -16,6 +15,7 @@ player.ready(function () { @@ -16,6 +15,7 @@ player.ready(function () {
console.log('Player ready.')
player.reset();
player.src({ type: 'application/x-mpegURL', src: streamURL });
player.poster('/thumbnail.jpg');
});
function setupPlayerEventHandlers() {

Loading…
Cancel
Save