add additional_video action and eval CustomEvents
[HTML5TV.git] / www / html5tv.js
index 2262545..97c42fa 100644 (file)
@@ -42,6 +42,22 @@ function chapterChange(isActive, args) {
     }\r
 }\r
 \r
+\r
+function additional_video(isActive, args) {\r
+       var video = $('video#' + args.id);\r
+       console.debug( isActive, args, video );\r
+       if (isActive) {\r
+               $('div#slide').hide();\r
+               video.show();\r
+               video[0].play();\r
+       } else {\r
+               video[0].pause();\r
+               video.hide();\r
+               $('div#slide').show();\r
+       }\r
+}\r
+\r
+\r
 $().ready(function() {\r
        //console.debug( video_sync );\r
        $("#vid").sync( html5tv.sync );\r