Corrections on Jwplayer
authorveltr
Tue, 23 Jul 2013 17:06:33 +0200
changeset 1007 639129cf95bc
parent 1006 40a9ce0779d5
child 1008 81243f1c7cff
Corrections on Jwplayer
src/widgets/Annotation.css
src/widgets/Annotation.js
src/widgets/JwpPlayer.js
test/spel.htm
--- a/src/widgets/Annotation.css	Fri Jul 19 17:21:13 2013 +0200
+++ b/src/widgets/Annotation.css	Tue Jul 23 17:06:33 2013 +0200
@@ -59,6 +59,7 @@
 
 .Ldt-Annotation-Title, .Ldt-Annotation-MashupMedia {
     color: #0068c4;
+    text-decoration: none;
 }
 
 .Ldt-Annotation-Type {
--- a/src/widgets/Annotation.js	Fri Jul 19 17:21:13 2013 +0200
+++ b/src/widgets/Annotation.js	Tue Jul 23 17:06:33 2013 +0200
@@ -34,7 +34,7 @@
     + '<div class="Ldt-Annotation-Inner Ldt-Annotation-Empty{{#start_minimized}} Ldt-Annotation-Minimized{{/start_minimized}}">'
     + '<div class="Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-MaxMinButton"></div>'
     + '{{#show_social}}<div class="Ldt-Annotation-Social Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty"></div>{{/show_social}}'
-    + '<h3 class="Ldt-Annotation-HiddenWhenEmpty">{{#show_annotation_type}}<span class="Ldt-Annotation-Type"></span> » {{/show_annotation_type}}<span class="Ldt-Annotation-Title"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">'
+    + '<h3 class="Ldt-Annotation-HiddenWhenEmpty">{{#show_annotation_type}}<span class="Ldt-Annotation-Type"></span> » {{/show_annotation_type}}<a class="Ldt-Annotation-Title" href="#"></a> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">'
     + '(<span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span>)</span></h3>'
     + '<h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">'
     + '(<span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span>)</span></h3>'
@@ -148,6 +148,13 @@
     
     this.renderTemplate();
     
+    this.$.find(".Ldt-Annotation-Title").click(function() {
+        if (currentAnnotation) {
+            _this.media.setCurrentTime(currentAnnotation.begin);
+        }
+        return false;
+    });
+    
     if (this.show_social) {
         this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget");
     }
--- a/src/widgets/JwpPlayer.js	Fri Jul 19 17:21:13 2013 +0200
+++ b/src/widgets/JwpPlayer.js	Tue Jul 23 17:06:33 2013 +0200
@@ -33,6 +33,10 @@
         //_pauseState = false;
         //this.media.trigger("play");
     }
+    
+    if (this.url_transform) {
+        _opts.file = this.url_transform(_opts.file);
+    }
 
     // Binding functions to jwplayer
 
--- a/test/spel.htm	Fri Jul 19 17:21:13 2013 +0200
+++ b/test/spel.htm	Tue Jul 23 17:06:33 2013 +0200
@@ -12,9 +12,11 @@
     </head>
 
     <body>
-        <h1>Tests Spectacle en ligne(s)</h1>
-        <div id="LdtPlayer"></div>
-        <div id="AnnotationsListContainer"></div>
+        <section style="width: 1070px; margin: 0 auto">
+            <h1>Tests Spectacle en ligne(s)</h1>
+            <div id="LdtPlayer"></div>
+            <div id="AnnotationsListContainer"></div>
+        </section>
         <script type="text/javascript">
 IriSP.libFiles.defaultDir = "libs/";
 IriSP.widgetsDir = "metadataplayer";
@@ -73,6 +75,13 @@
             annotation_type: "interpretation",
             show_social: false,
             arrow_position: 0
+        },
+        {
+            type: "SpelSyncHtml",
+            container: "AnnotationsListContainer",
+            height: 600,
+            width: 500,
+            src: "ctb.html"
         }
     ]
 };