Video title now renders escaped entities properly.

This commit is contained in:
rainbow napkin 2025-10-22 21:20:07 -04:00
parent 79df27b72c
commit a34ece4374

View file

@ -187,7 +187,7 @@ class mediaHandler{
* @param {String} title - Title to set * @param {String} title - Title to set
*/ */
setVideoTitle(title){ setVideoTitle(title){
this.player.title.textContent = `Currently Playing: ${title}`; this.player.title.innerText = `Currently Playing: ${utils.unescapeEntities(title)}`;
} }
/** /**
@ -370,7 +370,7 @@ class nullHandler extends rawFileBase{
} }
setVideoTitle(title){ setVideoTitle(title){
this.player.title.textContent = `Channel Off Air`; this.player.title.innerText = `Channel Off Air`;
} }
} }
@ -601,7 +601,7 @@ class youtubeEmbedHandler extends mediaHandler{
setVideoTitle(){ setVideoTitle(){
//Clear out the player title so that youtube's baked in title can do it's thing. //Clear out the player title so that youtube's baked in title can do it's thing.
//This will be replaced once we complete the full player control and remove the defualt youtube UI //This will be replaced once we complete the full player control and remove the defualt youtube UI
this.player.title.textContent = ""; this.player.title.innerText = "";
} }
/** /**
@ -741,12 +741,12 @@ class hlsLiveStreamHandler extends hlsBase{
setVideoTitle(title){ setVideoTitle(title){
//Add title as text content for security :P //Add title as text content for security :P
this.player.title.textContent = `: ${title}`; this.player.title.innerText = `: ${utils.unescapeEntities(title)}`;
//Create glow span //Create glow span
const glowSpan = document.createElement('span'); const glowSpan = document.createElement('span');
//Fill glow span content //Fill glow span content
glowSpan.textContent = "🔴LIVE"; glowSpan.innerText = "🔴LIVE";
//Set glowspan class //Set glowspan class
glowSpan.classList.add('critical-danger-text'); glowSpan.classList.add('critical-danger-text');