Hide the embedded video in the webif while not playing. Should fix #296 (just press stop when you wanna change the channel)
This commit is contained in:
parent
fee5c55922
commit
393bfdfe07
1 changed files with 8 additions and 4 deletions
|
@ -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';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue