From f946595639a8671e59f5ec9af9243c85ce783f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Wed, 5 Jan 2011 19:18:33 +0100 Subject: [PATCH 1/4] Provide a link to the http stream when the browser is missing a vlc-compatible plugin. --- src/webui/static/app/tvheadend.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index ccb8feb6..a2047b09 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -45,6 +45,10 @@ tvheadend.VLC = function(url) { vlc.style.display = 'none'; } + var missingPlugin = document.createElement('div'); + missingPlugin.style.display = 'none'; + missingPlugin.style.padding = '5px'; + var selectChannel = new Ext.form.ComboBox({ loadingText: 'Loading...', width: 200, @@ -59,8 +63,20 @@ tvheadend.VLC = function(url) { selectChannel.on('select', function(c, r) { var url = 'stream/channelid/' + r.data.chid; var chName = r.data.name; + if (!chName.length) { + chName = 'the channel'; + } + + if(!vlc.playlist || vlc.playlist == 'undefined') { + var chUrl = '' + chName + ''; + missingPlugin.innerHTML = '

You are missing a plugin for your browser.

'; + missingPlugin.innerHTML += '

You can still watch ' + chUrl + ' using an external player.

'; + missingPlugin.style.display = 'block'; + return; + } + vlc.style.display = 'block'; - + if(vlc.playlist && vlc.playlist.isPlaying) { vlc.playlist.stop(); } @@ -150,7 +166,7 @@ tvheadend.VLC = function(url) { disabled: true }, ], - items: [vlc] + items: [vlc, missingPlugin] }); win.on('render', function() { From 2c9e8439ea514c75052610fa580c856d5fedaa99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Fri, 13 May 2011 21:16:16 +0200 Subject: [PATCH 2/4] send eventId with events --- src/htsp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/htsp.c b/src/htsp.c index 608b5001..52e75e28 100644 --- a/src/htsp.c +++ b/src/htsp.c @@ -715,6 +715,7 @@ htsp_build_event(event_t *e) out = htsmsg_create_map(); + htsmsg_add_u32(out, "eventId", e->e_id); htsmsg_add_u32(out, "channelId", e->e_channel->ch_id); htsmsg_add_u32(out, "start", e->e_start); htsmsg_add_u32(out, "stop", e->e_stop); From b5e6113ba9588245458eed3436ac7f6da018c9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Fri, 13 May 2011 21:23:27 +0200 Subject: [PATCH 3/4] sync with upstream --- src/webui/static/app/tvheadend.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 1066f6f8..867e358c 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -51,10 +51,6 @@ tvheadend.VLC = function(url) { vlc.setAttribute('autoplay', 'no'); vlc.setAttribute('id', randomString()); - var missingPlugin = document.createElement('div'); - missingPlugin.style.display = 'none'; - missingPlugin.style.padding = '5px'; - var missingPlugin = document.createElement('div'); missingPlugin.style.display = 'none'; missingPlugin.style.padding = '5px'; From c1b96791e48c0dcbe3b9398ba789b23975074a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Fri, 13 May 2011 21:24:34 +0200 Subject: [PATCH 4/4] sync with upstream --- src/webui/static/app/tvheadend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 867e358c..5835b3f1 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -54,7 +54,7 @@ tvheadend.VLC = function(url) { var missingPlugin = document.createElement('div'); missingPlugin.style.display = 'none'; missingPlugin.style.padding = '5px'; - + var selectChannel = new Ext.form.ComboBox({ loadingText: 'Loading...', width: 200,