From 67cc21b1fabc4eddf7c547e7fb5c07dd11d25c5b Mon Sep 17 00:00:00 2001 From: badincite Date: Tue, 29 Oct 2024 09:45:05 -0400 Subject: [PATCH] Fix chromecast Chromecast needs to append the url origin for the source to properly pass to the cast device. And it appears to need the default receiver application ID. --- public/_playersite/videojs.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/_playersite/videojs.js b/public/_playersite/videojs.js index f39fdd5..8f3b748 100644 --- a/public/_playersite/videojs.js +++ b/public/_playersite/videojs.js @@ -6,8 +6,14 @@ var config = { liveui: true, responsive: true, fluid: true, - // Needed to append the url orgin in order for the source to properly pass to the cast device - sources: [{ src: playerConfig.source, type: 'application/x-mpegURL' }], + // 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 + sources: [{ src: window.location.origin + '/' + playerConfig.source, type: 'application/x-mpegURL' }], + plugins: { + license: playerConfig.license, + chromecast: { + receiverApplicationId: 'CC1AD845' + }, + }, }; if (chromecast) {