Fix the VLC plugin-detection. The HTML embed element have to be layed in order for the plugin to kick in.

This commit is contained in:
John Törnblom 2011-02-02 19:53:33 +01:00
parent e4a0f14081
commit 4be5da5921

View file

@ -69,6 +69,8 @@ tvheadend.VLC = function(url) {
chName = 'the stream';
}
vlc.style.display = 'block';
if(!vlc.playlist || vlc.playlist == 'undefined') {
var innerHTML = '';
innerHTML += '<p>You are missing a plugin for your browser.'
@ -78,12 +80,11 @@ tvheadend.VLC = function(url) {
innerHTML += '<p><a href="' + url + '">Direct URL</a></p>';
missingPlugin.innerHTML = innerHTML;
vlc.style.display = 'none';
missingPlugin.style.display = 'block';
return;
}
vlc.style.display = 'block';
if(vlc.playlist && vlc.playlist.isPlaying) {
vlc.playlist.stop();
}