diff --git a/src/webui/static/app/chconf.js b/src/webui/static/app/chconf.js index 49eecbe2..90902d0f 100644 --- a/src/webui/static/app/chconf.js +++ b/src/webui/static/app/chconf.js @@ -157,6 +157,15 @@ tvheadend.chconf = function() allowBlank: false }) }, + { + header: "Play", + dataIndex: 'chid', + width: 50, + renderer: function(value, metadata, record, row, col, store) { + url = makeRTSPprefix() + 'channelid/' + value + return 'Play' + } + }, { header: "XMLTV source", dataIndex: 'xmltvsrc', diff --git a/src/webui/static/app/dvb.js b/src/webui/static/app/dvb.js index a6d81d8a..a80ec8b5 100644 --- a/src/webui/static/app/dvb.js +++ b/src/webui/static/app/dvb.js @@ -362,6 +362,15 @@ tvheadend.dvb_services = function(adapterId) { dataIndex: 'svcname', width: 150 }, + { + header: "Play", + dataIndex: 'id', + width: 50, + renderer: function(value, metadata, record, row, col, store) { + url = makeRTSPprefix() + 'service/' + value + return 'Play' + } + }, { header: "Channel name", dataIndex: 'channelname', diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 727781b9..a2c5f462 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -75,6 +75,18 @@ function accessUpdate(o) { } +/** +* + */ +function setServerIpPort(o) { + tvheadend.serverIp = o.ip; + tvheadend.serverPort = o.port; +} + +function makeRTSPprefix() { + return 'rtsp://' + tvheadend.serverIp + ':' + tvheadend.serverPort + '/'; +} + /** * */ @@ -126,6 +138,8 @@ tvheadend.app = function() { tvheadend.comet.on('accessUpdate', accessUpdate); + tvheadend.comet.on('setServerIpPort', setServerIpPort); + tvheadend.comet.on('logmessage', function(m) { tvheadend.log(m.logtxt); });