Some tweaks
authorveltr
Tue, 18 Jun 2013 17:05:41 +0200
changeset 32 06d7faebcb8d
parent 31 8239b6d8417f
child 33 7af893e283d6
Some tweaks
player/css/styles.css
player/data/rigoletto.json
player/js/metadataplayer-core.js
player/js/player.js
--- a/player/css/styles.css	Tue Jun 18 12:22:38 2013 +0200
+++ b/player/css/styles.css	Tue Jun 18 17:05:41 2013 +0200
@@ -696,7 +696,7 @@
 }
 
 .chip-title {
-    position: absolute; top: 1px; left: 3px; font-size: 10px; line-height: 13px; height: 13px;
+    position: absolute; top: 0; left: 3px; font-size: 10px; line-height: 13px; height: 13px;
     font-weight: 700;
     display: block; width: 0; overflow: hidden;
     -webkit-transition: width 0.5s;
@@ -746,7 +746,7 @@
 
 .found .chip-circle {
     background: #ffffff;
-    border: 2px solid; left: -6px; top: 16px; width: 9px; height: 9px;
+    border: 2px solid; left: -6px; top: 14px; width: 9px; height: 9px;
 }
 
 .left-hiding-block, .right-hiding-block {
--- a/player/data/rigoletto.json	Tue Jun 18 12:22:38 2013 +0200
+++ b/player/data/rigoletto.json	Tue Jun 18 17:05:41 2013 +0200
@@ -315,8 +315,8 @@
                     }
                 ]
             },
-            "begin": 80000,
-            "end": 100000,
+            "begin": 0,
+            "end": 20000,
             "media": "media-01",
             "meta": {
                 "dc:contributor": "perso",
--- a/player/js/metadataplayer-core.js	Tue Jun 18 12:22:38 2013 +0200
+++ b/player/js/metadataplayer-core.js	Tue Jun 18 17:05:41 2013 +0200
@@ -27,7 +27,9 @@
 /* Initialization of the namespace */
 
 if (typeof window.IriSP === "undefined") {
-    window.IriSP = {};
+    window.IriSP = {
+        VERSION: "0.3.1"
+    };
 }
 
 if (typeof IriSP.jQuery === "undefined" && typeof window.jQuery !== "undefined" && parseFloat(window.jQuery().jquery) >= 1.7) {
@@ -96,7 +98,7 @@
         addToList(_regexp, '<span class="Ldt-Highlight">', '</span>');
     }
     
-    addToList(/(https?:\/\/)?\w+\.\w+\S+/gm, function(matches) {
+    addToList(/(https?:\/\/)?[\w\d\-]+\.[\w\d\-]+\S+/gm, function(matches) {
         return '<a href="' + (matches[1] ? '' : 'http://') + matches[0] + '" target="_blank">'
     }, '</a>');
     addToList(/@([\d\w]{1,15})/gm, function(matches) {
--- a/player/js/player.js	Tue Jun 18 12:22:38 2013 +0200
+++ b/player/js/player.js	Tue Jun 18 17:05:41 2013 +0200
@@ -295,6 +295,7 @@
                     slideInterval,
                     playing = false,
                     loaded = false,
+                    currentSlideLoaded = false,
                     slides = annotationinfo.annotation.content.images;
                 
                 var showCurrentImage = function() {
@@ -347,11 +348,16 @@
                     if (loaded) {
                         return;
                     }
+                    if (!currentSlideLoaded) {
+                        if (!!slides[currentslide].image && !!slides[currentslide].image.height) {
+                            currentSlideLoaded = true;
+                            showCurrentImage();
+                        }
+                    }
                     loaded = slides.reduce(function(mem, slide) {
                         return (mem && !!slide.image && !!slide.image.height);
                     }, true);
                     if (loaded) {
-                        showCurrentImage();
                         if (annotationinfo.annotation.autostart && slides.length > 1) {
                             togglePlay();
                         }