update VLC player

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1092 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg
2012-07-16 20:29:59 +00:00
parent 89a68cf538
commit 3d3f7d17ed
71 changed files with 477 additions and 83 deletions

View File

@@ -577,7 +577,7 @@ var dmenuclick = function(action, el, pos)
disableall();
window.location = '/cgi-bin/browse/play.jim?' +
window.location = '/play/play.jim?' +
'dir=' + encodeURIComponent(dir) +
'&file=' + file;
}

View File

@@ -42,7 +42,7 @@ set output {}
set data [get_data]
if {[llength $data]} {
sleep 2
sleep 3
set ndata [get_data]
foreach name [array names ndata] {
if {![dict exists $seen $name]} { set seen($name) 0 }

View File

@@ -1,60 +0,0 @@
.x-vlc-slider {
background:#C7F2FF;
text-align:center;
}
.x-vlc-slider-thumb {
background:#4EAECC;
width:3px;
}
.x-vlc-main {
}
.x-vlc-toolbar {
color:black;
}
.x-vlc-toolbar * {
vertical-align:top;
}
.x-vlc-btn {
padding-right:10px;
}
.x-vlc-btn-fullscreen {
background:url(/img/vlc/fullscreen2.gif) no-repeat;
}
.x-vlc-btn-plus {
background:url(/img/vlc/plus2.gif) no-repeat;
}
.x-vlc-btn-moins {
background:url(/img/vlc/moins2.gif) no-repeat;
}
.x-vlc-btn:hover {
color:red;
}
.x-vlc-btn-play {
background:url(/img/vlc/play2.gif) no-repeat;
}
.x-vlc-btn-stop {
background:url(/img/vlc/stop2.gif) no-repeat;
}
.x-vlc-btn-pause {
background:url(/img/vlc/pause2.gif) no-repeat;
}
.x-vlc-timer {
width:100px;
font-size:12px;
vertical-align:top;
text-align:center
}
.x-vlc-about {
font-size:10px;
}

View File

@@ -0,0 +1,288 @@
/**
* Flash (http://jquery.lukelutman.com/plugins/flash)
* A jQuery plugin for embedding Flash movies.
*
* Version 1.0
* November 9th, 2006
*
* Copyright (c) 2006 Luke Lutman (http://www.lukelutman.com)
* Dual licensed under the MIT and GPL licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/gpl-license.php
*
* Inspired by:
* SWFObject (http://blog.deconcept.com/swfobject/)
* UFO (http://www.bobbyvandersluis.com/ufo/)
* sIFR (http://www.mikeindustries.com/sifr/)
*
* IMPORTANT:
* The packed version of jQuery breaks ActiveX control
* activation in Internet Explorer. Use JSMin to minifiy
* jQuery (see: http://jquery.lukelutman.com/plugins/flash#activex).
*
**/
;(function(){
var $$;
/**
*
* @desc Replace matching elements with a flash movie.
* @author Luke Lutman
* @version 1.0.1
*
* @name flash
* @param Hash htmlOptions Options for the embed/object tag.
* @param Hash pluginOptions Options for detecting/updating the Flash plugin (optional).
* @param Function replace Custom block called for each matched element if flash is installed (optional).
* @param Function update Custom block called for each matched if flash isn't installed (optional).
* @type jQuery
*
* @cat plugins/flash
*
* @example $('#hello').flash({ src: 'hello.swf' });
* @desc Embed a Flash movie.
*
* @example $('#hello').flash({ src: 'hello.swf' }, { version: 8 });
* @desc Embed a Flash 8 movie.
*
* @example $('#hello').flash({ src: 'hello.swf' }, { expressInstall: true });
* @desc Embed a Flash movie using Express Install if flash isn't installed.
*
* @example $('#hello').flash({ src: 'hello.swf' }, { update: false });
* @desc Embed a Flash movie, don't show an update message if Flash isn't installed.
*
**/
$$ = jQuery.fn.flash = function(htmlOptions, pluginOptions, replace, update) {
// Set the default block.
var block = replace || $$.replace;
// Merge the default and passed plugin options.
pluginOptions = $$.copy($$.pluginOptions, pluginOptions);
// Detect Flash.
if(!$$.hasFlash(pluginOptions.version)) {
// Use Express Install (if specified and Flash plugin 6,0,65 or higher is installed).
if(pluginOptions.expressInstall && $$.hasFlash(6,0,65)) {
// Add the necessary flashvars (merged later).
var expressInstallOptions = {
flashvars: {
MMredirectURL: location,
MMplayerType: 'PlugIn',
MMdoctitle: jQuery('title').text()
}
};
// Ask the user to update (if specified).
} else if (pluginOptions.update) {
// Change the block to insert the update message instead of the flash movie.
block = update || $$.update;
// Fail
} else {
// The required version of flash isn't installed.
// Express Install is turned off, or flash 6,0,65 isn't installed.
// Update is turned off.
// Return without doing anything.
return this;
}
}
// Merge the default, express install and passed html options.
htmlOptions = $$.copy($$.htmlOptions, expressInstallOptions, htmlOptions);
// Invoke $block (with a copy of the merged html options) for each element.
return this.each(function(){
block.call(this, $$.copy(htmlOptions));
});
};
/**
*
* @name flash.copy
* @desc Copy an arbitrary number of objects into a new object.
* @type Object
*
* @example $$.copy({ foo: 1 }, { bar: 2 });
* @result { foo: 1, bar: 2 };
*
**/
$$.copy = function() {
var options = {}, flashvars = {};
for(var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if(arg == undefined) continue;
jQuery.extend(options, arg);
// don't clobber one flash vars object with another
// merge them instead
if(arg.flashvars == undefined) continue;
jQuery.extend(flashvars, arg.flashvars);
}
options.flashvars = flashvars;
return options;
};
/*
* @name flash.hasFlash
* @desc Check if a specific version of the Flash plugin is installed
* @type Boolean
*
**/
$$.hasFlash = function() {
// look for a flag in the query string to bypass flash detection
if(/hasFlash\=true/.test(location)) return true;
if(/hasFlash\=false/.test(location)) return false;
var pv = $$.hasFlash.playerVersion().match(/\d+/g);
var rv = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) || String($$.pluginOptions.version).match(/\d+/g);
for(var i = 0; i < 3; i++) {
pv[i] = parseInt(pv[i] || 0);
rv[i] = parseInt(rv[i] || 0);
// player is less than required
if(pv[i] < rv[i]) return false;
// player is greater than required
if(pv[i] > rv[i]) return true;
}
// major version, minor version and revision match exactly
return true;
};
/**
*
* @name flash.hasFlash.playerVersion
* @desc Get the version of the installed Flash plugin.
* @type String
*
**/
$$.hasFlash.playerVersion = function() {
// ie
try {
try {
// avoid fp6 minor version lookup issues
// see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
try { axo.AllowScriptAccess = 'always'; }
catch(e) { return '6,0,0'; }
} catch(e) {}
return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
// other browsers
} catch(e) {
try {
if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
}
} catch(e) {}
}
return '0,0,0';
};
/**
*
* @name flash.htmlOptions
* @desc The default set of options for the object or embed tag.
*
**/
$$.htmlOptions = {
height: 240,
flashvars: {},
pluginspage: 'http://www.adobe.com/go/getflashplayer',
src: '#',
type: 'application/x-shockwave-flash',
width: 320
};
/**
*
* @name flash.pluginOptions
* @desc The default set of options for checking/updating the flash Plugin.
*
**/
$$.pluginOptions = {
expressInstall: false,
update: true,
version: '6.0.65'
};
/**
*
* @name flash.replace
* @desc The default method for replacing an element with a Flash movie.
*
**/
$$.replace = function(htmlOptions) {
this.innerHTML = '<div class="alt">'+this.innerHTML+'</div>';
jQuery(this)
.addClass('flash-replaced')
.prepend($$.transform(htmlOptions));
};
/**
*
* @name flash.update
* @desc The default method for replacing an element with an update message.
*
**/
$$.update = function(htmlOptions) {
var url = String(location).split('?');
url.splice(1,0,'?hasFlash=true&');
url = url.join('');
var msg = '<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';
this.innerHTML = '<span class="alt">'+this.innerHTML+'</span>';
jQuery(this)
.addClass('flash-update')
.prepend(msg);
};
/**
*
* @desc Convert a hash of html options to a string of attributes, using Function.apply().
* @example toAttributeString.apply(htmlOptions)
* @result foo="bar" foo="bar"
*
**/
function toAttributeString() {
var s = '';
for(var key in this)
if(typeof this[key] != 'function')
s += key+'="'+this[key]+'" ';
return s;
};
/**
*
* @desc Convert a hash of flashvars to a url-encoded string, using Function.apply().
* @example toFlashvarsString.apply(flashvarsObject)
* @result foo=bar&foo=bar
*
**/
function toFlashvarsString() {
var s = '';
for(var key in this)
if(typeof this[key] != 'function')
s += key+'='+encodeURIComponent(this[key])+'&';
return s.replace(/&$/, '');
};
/**
*
* @name flash.transform
* @desc Transform a set of html options into an embed tag.
* @type String
*
* @example $$.transform(htmlOptions)
* @result <embed src="foo.swf" ... />
*
* Note: The embed tag is NOT standards-compliant, but it
* works in all current browsers. flash.transform can be
* overwritten with a custom function to generate more
* standards-compliant markup.
*
**/
$$.transform = function(htmlOptions) {
htmlOptions.toString = toAttributeString;
if(htmlOptions.flashvars) htmlOptions.flashvars.toString = toFlashvarsString;
return '<embed ' + String(htmlOptions) + '/>';
};
/**
*
* Flash Player 9 Fix (http://blog.deconcept.com/2006/07/28/swfobject-143-released/)
*
**/
if (window.attachEvent) {
window.attachEvent("onbeforeunload", function(){
__flash_unloadHandler = function() {};
__flash_savedUnloadHandler = function() {};
});
}
})();

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 97 B

After

Width:  |  Height:  |  Size: 97 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 94 B

After

Width:  |  Height:  |  Size: 94 B

View File

Before

Width:  |  Height:  |  Size: 80 B

After

Width:  |  Height:  |  Size: 80 B

View File

Before

Width:  |  Height:  |  Size: 896 B

After

Width:  |  Height:  |  Size: 896 B

View File

Before

Width:  |  Height:  |  Size: 97 B

After

Width:  |  Height:  |  Size: 97 B

View File

Before

Width:  |  Height:  |  Size: 869 B

After

Width:  |  Height:  |  Size: 869 B

View File

Before

Width:  |  Height:  |  Size: 1014 B

After

Width:  |  Height:  |  Size: 1014 B

View File

Before

Width:  |  Height:  |  Size: 1012 B

After

Width:  |  Height:  |  Size: 1012 B

View File

Before

Width:  |  Height:  |  Size: 1003 B

After

Width:  |  Height:  |  Size: 1003 B

View File

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

View File

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 177 B

View File

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 215 B

View File

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 195 B

View File

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

View File

Before

Width:  |  Height:  |  Size: 100 B

After

Width:  |  Height:  |  Size: 100 B

View File

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 60 B

After

Width:  |  Height:  |  Size: 60 B

View File

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 357 B

View File

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View File

Before

Width:  |  Height:  |  Size: 994 B

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

View File

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

View File

@@ -29,11 +29,12 @@ if {![$ts flag "ODEncrypted"]} {
puts "
<span id=url style=\"display: none\">$url</span>
<span id=duration style=\"display: none\">[$ts duration 1]</span>
"
puts {
<script language="javascript" src="/js/jquery-vlc.js"></script>
<link rel="stylesheet" type="text/css" href="/css/vlc.css" />
<script language=javascript src=vlc.js></script>
<link rel=stylesheet type=text/css href=vlc.css />
<script type=text/javascript src=play.js></script>
<fieldset class=cleft style="margin: 0 1em 1em 1em">

View File

@@ -1,7 +1,9 @@
$(document).ready(function() {
var url = $('#url').text();
var duration = $('#duration').text();
var vlc = VLCobject.embedPlayer('vlc', 800, 450, true);
vlc.play(encodeURI(url));

View File

@@ -0,0 +1,82 @@
.x-vlc-slider {
background:#C7F2FF;
text-align:center;
}
.x-vlc-slider-thumb {
background:#4EAECC;
width:3px;
}
.x-vlc-main {
}
.x-vlc-toolbar {
color:black;
}
.x-vlc-toolbar * {
vertical-align:top;
}
.x-vlc-btn {
padding-right:10px;
height: 35px;
}
.x-vlc-btn-fullscreen {
background:url(img/vlcfullscreenbutton.png) no-repeat;
}
.x-vlc-btn-fullscreen:hover {
background:url(img/vlcfullscreenbuttonclick.png) no-repeat;
}
.x-vlc-btn-ff {
background:url(img/seekarrownovideoright.png) no-repeat;
}
.x-vlc-btn-rew {
background:url(img/seekarrownovideoleft.png) no-repeat;
}
.x-vlc-btn-sub {
background:url(img/playlist.png) no-repeat;
}
.x-vlc-btn-sub:hover, .x-vlc-btn-sub-clicked {
background:url(img/playlistclick.png) no-repeat;
}
.x-vlc-btn:hover {
color:red;
}
.x-vlc-btn-play {
background:url(img/vlcplaybutton.png) no-repeat;
}
.x-vlc-btn-play:hover {
background:url(img/vlcplaybuttonclick.png) no-repeat;
}
.x-vlc-btn-stop {
background:url(img/vlcstopbutton.png) no-repeat;
}
.x-vlc-btn-stop:hover {
background:url(img/vlcstopbuttonclick.png) no-repeat;
}
.x-vlc-btn-pause {
background:url(img/vlcpausebutton.png) no-repeat;
}
.x-vlc-btn-pause:hover {
background:url(img/vlcpausebuttonclick.png) no-repeat;
}
.x-vlc-timer {
width:100px;
font-size:12px;
vertical-align:top;
text-align:center
}
.x-vlc-about {
font-size:10px;
}

View File

@@ -22,7 +22,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
VLC_PLUGIN:"VLC Multimedia Plug-in"
,VLC_AX:"VideoLAN.VLCPlugin.2"
,VLC_MIME_TYPE:"application/x-vlc-plugin"
,TOOLBAR_HEIGHT:10
,TOOLBAR_HEIGHT:15
,INSTANCES:{} // holds multiples instances
,UNICODES:{
PLAY:'\u25ba'
@@ -254,25 +254,36 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
var tgt = $('#' + playerId + '_toolbar');
tgt.html('');
this.createButton(playerId, '&nbsp;&nbsp;', 'x-vlc-btn-play', function(event) {
//alert('play '+ event.data.instance.playerId);
event.data.instance.togglePlay();
});
event.data.instance.togglePlay();
}, 25);
this.createButton(playerId, '&nbsp;&nbsp;', 'x-vlc-btn-stop', function(event) {
//alert('stop '+ event.data.instance.playerId);
event.data.instance.stop();
});
instance.createSlider();
this.createButton(playerId, '&nbsp;&nbsp;', 'x-vlc-btn-rew', function(event) {
event.data.instance.slower();
});
this.createButton(playerId, '&nbsp;&nbsp;', 'x-vlc-btn-ff', function(event) {
event.data.instance.faster();
});
this.createSpeed(playerId);
//instance.createSlider();
this.getInstance(playerId).statusChanged();
this.createTimer(playerId);
//this.createTimer(playerId);
this.createButton(playerId, '&nbsp;&nbsp;', 'x-vlc-btn-fullscreen', function(event) {
//alert('stop '+ event.data.instance.playerId);
event.data.instance.toggleFullscreen();
});
this.createButton(playerId, '&nbsp;&nbsp;', 'x-vlc-btn-plus', function(event) {
this.createButton(playerId, '&nbsp;&nbsp;', 'x-vlc-btn-sub', function(event) {
//alert('stop '+ event.data.instance.playerId);
// event.data.instance.stop();
$('#' + instance.playerId + '_about').slideToggle(0);
event.data.instance.toggleSubtitles();
});
this.createStatus(playerId);
// this.createButton(playerId, '&nbsp;&nbsp;', 'x-vlc-btn-plus', function(event) {
// //alert('stop '+ event.data.instance.playerId);
// // event.data.instance.stop();
// $('#' + instance.playerId + '_about').slideToggle(0);
// });
aboutTxt = "";
if (instance.version()) {
aboutTxt = 'Installed version: ' + instance.version();
@@ -290,10 +301,11 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
if(!playerId) playerId=this.INSTANCES[0];
delete this.INSTANCES[playerId] ;
}
,createButton:function(playerId, html, cls, handler) {
,createButton:function(playerId, html, cls, handler, width) {
if (!width) width = 16;
var tgt = $('#' + playerId + '_toolbar');
var id = playerId + '_toolbar_btn' + tgt[0].childNodes.length;
var btn = "<div id='" + id + "' style='float:left;width:16px;text-align:center;cursor:pointer' class='x-vlc-btn "+cls+"' >" + html + "</div>";
var btn = "<div id='" + id + "' style='float:left;width:" + width + "px;text-align:center;cursor:pointer' class='x-vlc-btn "+cls+"' >" + html + "</div>";
tgt.append(btn);
var instance = this.getInstance(playerId);
if (handler) {
@@ -303,6 +315,16 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
,createSpeed:function(playerId) {
var tgt = $('#' + playerId + '_toolbar' );
var speed = "<div id='" + playerId + "_speed' style='float:left;text-align:center;width:100px' class='x-vlc-timer'>&nbsp;x1&nbsp;</div>"
tgt.append(speed);
}
,createStatus:function(playerId) {
var tgt = $('#' + playerId + '_toolbar' );
var status = "<div id='" + playerId + "_status' style='float:left;text-align:center;width:200px' class='x-vlc-status'>&nbsp;&nbsp;</div>"
tgt.append(status);
}
,createTimer:function(playerId) {
var tgt = $('#' + playerId + '_toolbar' );
var timer = "<div id='" + playerId + "_timer' style='float:left;text-align:center;width:100px' class='x-vlc-timer'>&nbsp;00:00/00:00&nbsp;</div>"
@@ -325,6 +347,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
,btn_play:playerId + '_toolbar_btn0'
,plugin:playerId + '_plugin'
,timer:playerId + '_timer'
,speed:playerId + '_speed'
,stat:playerId + '_status'
,status:null
,__getPlugin:function() {
@@ -351,13 +375,14 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// plugin.playlist.playItem(id);
}
,play:function(uri) {
,play:function(uri, duration) {
var plugin = this.__getPlugin();
if (!plugin) {
setTimeout("VLCobject.getInstance('" + this.playerId + "').play('" + uri + "');", 500);
return;
}
var options = this.options.get();
this.statusCheckStart();
if (uri) {
var id = plugin.playlist.add(uri, uri, options);
@@ -379,16 +404,66 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
plugin.video.toggleFullscreen();
//plugin.video.fullscreen();
}
,toggleSubtitles:function() {
var plugin = this.__getPlugin();
var tgt = $('.x-vlc-btn-sub');
if (plugin.subtitle.track)
{
tgt.removeClass('x-vlc-btn-sub-clicked');
plugin.subtitle.track = 0;
this.setStatus('Subtitles disabled.');
}
else
{
tgt.addClass('x-vlc-btn-sub-clicked');
plugin.subtitle.track = 1;
this.setStatus('Subtitles enabled.');
}
}
,setStatus:function(txt) {
$('#' + this.stat)
.html(txt)
.show('slow')
.delay(5000)
.hide('slow');
}
,setSpeed:function() {
var plugin = this.__getPlugin();
if (plugin.input.rate == 1)
this.setPlaying(true);
else
this.setPlaying(false);
$('#' + this.speed).html(
'&nbsp;x' + plugin.input.rate + '&nbsp');
this.setStatus('Set speed to x' + plugin.input.rate);
}
,faster:function() {
var plugin = this.__getPlugin();
if (plugin.input.rate < 8)
plugin.input.rate *= 2;
this.setSpeed();
}
,slower:function() {
var plugin = this.__getPlugin();
if (plugin.input.rate > 1)
plugin.input.rate /= 2;
this.setSpeed();
}
,togglePlay:function() {
var plugin = this.__getPlugin();
if (plugin.playlist.isPlaying) {
plugin.playlist.togglePause();
if (plugin.input.rate != 1)
{
plugin.input.rate = 1;
this.setSpeed();
}
else
plugin.playlist.togglePause();
}
else {
plugin.playlist.play();
}
this.statusCheckStart();
//plugin.playlist.togglePause();
}
,stop:function() {
@@ -499,6 +574,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
this.statusChanged();
}
if (plugin.playlist.isPlaying) {
this.updatePosition(plugin.input.time / 1000, plugin.input.length / 1000)
@@ -542,6 +619,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
return l;
}
,updateSlider:function(percentage) {
return;
var td1 = $('#' + this.slider +' :first-child :first-child :first-child');
var td3 = $('#' + this.slider +' :first-child :first-child :last-child');
@@ -557,6 +635,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
tb.html(txt);
}
,updatePosition:function(position, length) {
return;
// update timer
$('#' + this.timer).html(this.secsToTime(position) + '/' + this.secsToTime(length));
var tb = $('#' +this.playerId + '_toolbar_slider' );
@@ -592,7 +671,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
var table_id= this.playerId + '_toolbar_slider_tb';
var progress = "<table id='" + table_id + "' border=0 style='margin-top:5px;height:10px;cursor:pointer;display:inline' cellpadding=0 cellspacing=0 ><tr ><td width='0' class='x-vlc-slider'></td><td class='x-vlc-slider-thumb'></td><td width='" + (offset) + "' class='x-vlc-slider'></td></tr></table>";
if ($('#' + slider_id).length == 0) {
// div not preset exists
var tgt = $('#' + this.playerId + '_toolbar' );

View File

@@ -392,8 +392,10 @@ proc {epg dbfetch} {mode args} {
#puts "QUERY -$query-"
set records {}
foreach rec [$::channeldb query $query] {
lappend records [epg new $rec]
catch {
foreach rec [$::channeldb query $query] {
lappend records [epg new $rec]
}
}
return $records
}