]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Hide the embedded video in the webif while not playing. Should fix #296 (just press...
authorsb1066 <sb1066@gmail.com>
Fri, 29 Oct 2010 18:46:53 +0000 (18:46 +0000)
committersb1066 <sb1066@gmail.com>
Fri, 29 Oct 2010 18:46:53 +0000 (18:46 +0000)
src/webui/static/app/tvheadend.js

index 189d9e2adffb95cbf836677a5c5a00eecd40c7d9..aabd67d438775c78432a1ad41c9883e62b7660e7 100644 (file)
@@ -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';
           }
         }
       },