summaryrefslogtreecommitdiff
path: root/live/js
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-06-21 19:52:46 +0200
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2008-06-21 19:52:46 +0200
commit0228a984b44717e7866c126fbe0a2eba68f0a5c3 (patch)
tree2f1435311bc03eb71a1801c7fc1e197ab22756bf /live/js
parent79f74de951779431ac46535ed1a0c2824a925c4f (diff)
downloadvdr-plugin-live-0228a984b44717e7866c126fbe0a2eba68f0a5c3.tar.gz
vdr-plugin-live-0228a984b44717e7866c126fbe0a2eba68f0a5c3.tar.bz2
Use the previous commited functionality to stream recordings.
The recordings now have a stream button beneath them.
Diffstat (limited to 'live/js')
-rw-r--r--live/js/live/pageenhance.js2
-rw-r--r--live/js/live/vlc.js53
2 files changed, 41 insertions, 14 deletions
diff --git a/live/js/live/pageenhance.js b/live/js/live/pageenhance.js
index 5ca90c0..dadbab2 100644
--- a/live/js/live/pageenhance.js
+++ b/live/js/live/pageenhance.js
@@ -12,7 +12,7 @@ var PageEnhance = new Class({
options: {
epgLinkSelector: 'a[href^="epginfo.html?epgid"]',
actionLinkSelector: 'a[href^="vdr_request/"]',
- vlcLinkSelector: 'a[href^="vlc.html?channel"]',
+ vlcLinkSelector: 'a[href^="vlc.html?"]',
vlcWinOptions: {
size: { width: 720, height: 640 }
},
diff --git a/live/js/live/vlc.js b/live/js/live/vlc.js
index 13ee77c..927f3a4 100644
--- a/live/js/live/vlc.js
+++ b/live/js/live/vlc.js
@@ -54,7 +54,8 @@ var VLC = new Class({
id: "Close",
classes: { on: "yellow", off: "yellow" }},
],
- offset: 5
+ offset: 5,
+ playRecording: false
},
initialize: function(id, options){
@@ -65,6 +66,11 @@ var VLC = new Class({
playerSetup: function(){
this.vlc = $(this.id);
+ this.newVlcApi = (this.vlc.VersionInfo != null);
+ if (this.newVlcApi) {
+ // disable logging.
+ this.vlc.log.verbosity = -1;
+ }
// add here new actions these class might support:
var actions = {
play: { check: this.isPlaying, toggle: this.togglePlay },
@@ -104,32 +110,53 @@ var VLC = new Class({
},
isPlaying: function(){
- // return this.vlc.playlist && this.vlc.playlist.isPlaying;
- return this.vlc.isplaying();
+ if (this.newVlcApi)
+ return this.vlc.playlist && this.vlc.playlist.isPlaying;
+ else
+ return this.vlc.isplaying();
},
isMuted: function(){
- // return this.vlc.audio && this.vlc.audio.mute;
- var res = this.vlc.get_volume();
- return 0 == res;
+ if (this.newVlcApi)
+ return this.vlc.audio && this.vlc.audio.mute;
+ else {
+ var res = this.vlc.get_volume();
+ return 0 == res;
+ }
},
togglePlay: function(){
- // this.vlc.playlist.togglePause();
- if (this.isPlaying())
- this.vlc.stop();
- else
- this.vlc.play();
+ if (this.newVlcApi)
+ if (!this.options.playRecording)
+ this.vlc.playlist.togglePause();
+ else {
+ if (this.vlc.playlist.isPlaying)
+ this.vlc.playlist.stop();
+ else
+ this.vlc.playlist.play();
+ }
+ else {
+ if (this.isPlaying())
+ this.vlc.stop();
+ else
+ this.vlc.play();
+ }
this.setStates();
},
toggleMute: function(){
- this.vlc.mute();
+ if (this.newVlcApi)
+ this.vlc.audio.toggleMute();
+ else
+ this.vlc.mute();
this.setStates();
},
toggleScreen: function(){
- this.vlc.fullscreen();
+ if (this.newVlcApi)
+ this.vlc.video.toggleFullscreen();
+ else
+ this.vlc.fullscreen();
this.setStates();
},