X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=www%2Fhtml5tv.js;h=f23bfade07f4ce6b46a0166da0246393c7354717;hb=62e6f8bd5eecb9d08338df1a5b18b2862c765646;hp=0376c0e9ad0e03d95af0e98d0b9737318606a1d1;hpb=6837ce3e51fd8fc82acbc52ede6df100e20ec62b;p=HTML5TV.git
diff --git a/www/html5tv.js b/www/html5tv.js
index 0376c0e..f23bfad 100644
--- a/www/html5tv.js
+++ b/www/html5tv.js
@@ -16,7 +16,7 @@ function myCarousel_onBeforeAnimation(carousel, state) {
var event = carousel.options.customEventManager.getEvent(i - 1);
- var html = '![' + event.args.description + '](' + event.args.src + ')
' + event.args.title + '
';
+ var html = '![' + event.args.description + '](' + event.args.src + ')
' + event.args.title + '
';
carousel.add(i, html);
@@ -24,34 +24,64 @@ function myCarousel_onBeforeAnimation(carousel, state) {
}
}
+function seek_video(time) {
+ var videoElement = $("video#vid").get(0);
+ videoElement.currentTime = time;
+}
+
+
function myCarousel_addClickHandler(id, time) {
$("#" + id).click(function() {
- var videoElement = $("video#vid").get(0);
- videoElement.currentTime = time;
+ seek_video( time );
});
}
function chapterChange(isActive, args) {
+
+//console.debug( isActive, args );
+
if (isActive) {
$("#carousel img").css("border-color", "#272928");
$("#" + args.id).css("border-color", "white");
$("#carousel .thumbnailOverlay").css("visibility", "hidden");
$("#" + args.id + " + .thumbnailOverlay").css("visibility", "visible");
+ $('#sub_' + args.index).addClass('active');
+
theCarousel.scroll(args.index, true);
- }
+ } else {
+ $('#sub_' + args.index).removeClass('active');
+ }
+}
+
+
+function additional_video(isActive, args) {
+ var video = $('video#' + args.id);
+//console.debug( isActive, args, video );
+ if (isActive) {
+ $('div#slide').hide();
+ video.show();
+ video[0].play();
+ } else {
+ video[0].pause();
+ video.hide();
+ $('div#slide').show();
+ }
}
+
$().ready(function() {
- console.debug( video_sync );
- $("#vid").sync( video_sync );
+//console.debug( video_sync );
+ $("#vid").sync( html5tv.sync );
$(".toggleContentPanel").click(function() {
var contentPanelId = "#" + ($(this).attr("class")).split(" ")[1];
$(contentPanelId).toggle("blind", {}, 100);
+/*
var currentBackground = $(this).css("background-image");
var newBackground = currentBackground.indexOf("Show") >=0 ? "url(contentPanelHide.png)" : "url(contentPanelShow.png)";
$(this).css("background-image", newBackground);
+*/
});
var synchroniser = $("#vid").data("synchroniser");
@@ -67,4 +97,12 @@ $().ready(function() {
initCallback: myCarousel_initCallback,
customEventManager: customEventManager
});
+
+ $('td.seek_video').click( function() {
+//console.debug( 'click', this );
+ var mmss = this.textContent;
+ var to = this.firstChild.hash.replace('#','');
+//console.debug( 'seek', mmss, to );
+ seek_video( to );
+ } );
});