From 393bfdfe07da279166dc9d8bb737e3df226943b9 Mon Sep 17 00:00:00 2001 From: sb1066 Date: Fri, 29 Oct 2010 18:46:53 +0000 Subject: [PATCH] Hide the embedded video in the webif while not playing. Should fix #296 (just press stop when you wanna change the channel) --- src/webui/static/app/tvheadend.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 189d9e2a..aabd67d4 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'; } } },