From 08b1dd0ba0a3f8c54a51aa67ae7c4b24b8372893 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Fri, 1 Nov 2024 11:23:06 +0100 Subject: [PATCH] Fix chromecast support --- public/_playersite/videojs.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/public/_playersite/videojs.js b/public/_playersite/videojs.js index 8f3b748..0ec0675 100644 --- a/public/_playersite/videojs.js +++ b/public/_playersite/videojs.js @@ -6,24 +6,22 @@ var config = { liveui: true, responsive: true, fluid: true, - // Needed to append the url origin in order for the source to properly pass to the cast device. Also provide a default reciever application ID + // Needed to append the url origin in order for the source to properly pass to the cast device sources: [{ src: window.location.origin + '/' + playerConfig.source, type: 'application/x-mpegURL' }], - plugins: { - license: playerConfig.license, - chromecast: { - receiverApplicationId: 'CC1AD845' - }, - }, + plugins: {}, }; if (chromecast) { config.techOrder = ['chromecast', 'html5']; + // Provide a default reciever application ID + config.plugins.chromecast = { + receiverApplicationId: 'CC1AD845', + }; } var player = videojs('player', config); player.ready(function () { - if (chromecast) { player.chromecast(); } @@ -31,7 +29,7 @@ player.ready(function () { if (airplay) { player.airPlay(); } - + player.license(playerConfig.license); if (playerConfig.logo.image.length != 0) {