Escape stream urls in the player js
This commit is contained in:
parent
23bf866211
commit
94a7643ebc
|
@ -35,20 +35,21 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.playerMode == "manual") {
|
if (this.playerMode == "manual") {
|
||||||
this.settings.url = "<?php echo $this->streamURL ?>";
|
this.settings.url = htmlEscape("<?php echo $this->streamURL ?>");
|
||||||
this.settings.codec = "<?php echo $this->codec ?>";
|
this.settings.codec = "<?php echo $this->codec ?>";
|
||||||
} else if (this.playerMode == "auto") {
|
} else if (this.playerMode == "auto") {
|
||||||
this.availableMobileStreamQueue = <?php echo $this->availableMobileStreams?>;
|
this.availableMobileStreamQueue = <?php echo $this->availableMobileStreams?>;
|
||||||
this.availableDesktopStreamQueue = <?php echo $this->availableDesktopStreams?>;
|
this.availableDesktopStreamQueue = <?php echo $this->availableDesktopStreams?>;
|
||||||
var stream = this.getNextAvailableStream();
|
var stream = this.getNextAvailableStream();
|
||||||
this.settings.url = stream["url"];
|
this.settings.url = htmlEscape(stream["url"]);
|
||||||
this.settings.codec = stream["codec"];
|
this.settings.codec = stream["codec"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the Muses player object
|
// Create the Muses player object
|
||||||
MRP.insert(this.settings);
|
MRP.insert(this.settings);
|
||||||
|
|
||||||
$("p.station_name").html(htmlEscape("<?php echo $this->station_name?>"));
|
var station_name = htmlEscape("<?php echo $this->station_name?>");
|
||||||
|
$("p.station_name").html(station_name);
|
||||||
|
|
||||||
attachStreamMetadataToPlayer();
|
attachStreamMetadataToPlayer();
|
||||||
|
|
||||||
|
@ -132,7 +133,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
MusesPlayer.prototype.setURL = function(url) {
|
MusesPlayer.prototype.setURL = function(url) {
|
||||||
console.log("setURL");
|
|
||||||
MRP.setUrl(url);
|
MRP.setUrl(url);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
// connection limit reached or problem connecting to stream
|
// connection limit reached or problem connecting to stream
|
||||||
if (value === "0") {
|
if (value === "0") {
|
||||||
var stream = musesPlayer.getNextAvailableStream();
|
var stream = musesPlayer.getNextAvailableStream();
|
||||||
musesPlayer.setURL(stream["url"]);
|
musesPlayer.setURL(htmlEscape(stream["url"]));
|
||||||
musesPlayer.play();
|
musesPlayer.play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue