Embed: clear target element before appending player

This commit is contained in:
Cat 2016-12-06 15:19:16 +01:00 committed by Thulinma
parent b0326ccd1e
commit 17c1368235

View file

@ -863,6 +863,7 @@ function mistPlay(streamName,options) {
embedLog('Checking available players..'); embedLog('Checking available players..');
var source = false; var source = false;
var mistPlayer = false;
function checkPlayer(p_shortname) { function checkPlayer(p_shortname) {
if ((startCombo) && (!startCombo.started.player)) { if ((startCombo) && (!startCombo.started.player)) {
@ -950,6 +951,7 @@ function mistPlay(streamName,options) {
} }
} }
options.target.innerHTML = '';
if (mistPlayer) { if (mistPlayer) {
//create the options to send to the player //create the options to send to the player
@ -1026,6 +1028,7 @@ function mistPlay(streamName,options) {
if (player.setTracks(false)) { if (player.setTracks(false)) {
//gather track info //gather track info
//tracks
var tracks = { var tracks = {
video: [], video: [],
audio: [], audio: [],
@ -1112,6 +1115,7 @@ function mistPlay(streamName,options) {
if (player.setTracks(false)) { if (player.setTracks(false)) {
player.onready(function(){ player.onready(function(){
//player.setTracks(usetracks);
if ('setTracks' in options) { player.setTracks(options.setTracks); } if ('setTracks' in options) { player.setTracks(options.setTracks); }
}); });
} }