From: sb1066 Date: Fri, 29 Oct 2010 18:46:53 +0000 (+0000) Subject: Hide the embedded video in the webif while not playing. Should fix #296 (just press... X-Git-Tag: 2.12~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=393bfdfe07da279166dc9d8bb737e3df226943b9;p=thirdparty%2Ftvheadend.git Hide the embedded video in the webif while not playing. Should fix #296 (just press stop when you wanna change the channel) --- diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 189d9e2ad..aabd67d43 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -42,6 +42,8 @@ tvheadend.VLC = function(url) { if(url) { vlc.setAttribute('src', url); } + + vlc.style.display = 'none'; var selectChannel = new Ext.form.ComboBox({ loadingText: 'Loading...', @@ -57,11 +59,12 @@ tvheadend.VLC = function(url) { selectChannel.on('select', function(c, r) { var url = 'stream/channelid/' + r.data.chid; var chName = r.data.name; + vlc.style.display = 'block'; - if(vlc.playlist.isPlaying) { - vlc.playlist.stop(); - } - if(vlc.playlist.items.count) { + if(vlc.playlist.isPlaying) { + vlc.playlist.stop(); + } + if(vlc.playlist.items.count) { vlc.playlist.items.clear(); } @@ -126,6 +129,7 @@ tvheadend.VLC = function(url) { handler: function() { if(vlc.playlist.items.count) { vlc.playlist.stop(); + vlc.style.display = 'none'; } } },