--- a/integration/js/mashupcore.js Thu Jan 17 17:21:51 2013 +0100
+++ b/integration/js/mashupcore.js Tue Jan 29 17:26:56 2013 +0100
@@ -309,7 +309,6 @@
videourl = IriSP.video_url_transform(media.video);
}
var videoid = "video_" + media.id,
- videoEl = $('<video>'),
width = $(".video").width(),
height = $(".video").height(),
mp4_file = videourl.replace(/\.webm$/i,'.mp4'),
@@ -469,7 +468,9 @@
if (media === currentMedia) {
seekdiv.hide();
}
- mashup.checkLoaded();
+ if (mashup === currentMedia && media === mashup.currentMedia) {
+ changeCurrentAnnotation();
+ }
});
media.on("play", function() {
@@ -664,9 +665,6 @@
seekdiv.show();
}
}
- if (currentMedia.elementType === "mashup") {
- mashup.checkLoaded();
- }
$(".Ldt-Ctrl-Time-Total").text(currentMedia.duration.toString());
currentMedia.trigger("timeupdate",currentMedia.getCurrentTime());
currentMedia.trigger("pause");
--- a/integration/js/model.js Thu Jan 17 17:21:51 2013 +0100
+++ b/integration/js/model.js Tue Jan 29 17:26:56 2013 +0100
@@ -548,6 +548,7 @@
this.volume = .5;
this.paused = true;
this.muted = false;
+ this.loadedMetadata = false;
var _this = this;
this.on("play", function() {
_this.paused = false;
@@ -572,6 +573,9 @@
_this.trigger("enter-annotation",_a);
});
});
+ this.on("loadedmetadata", function() {
+ _this.loadedMetadata = true;
+ })
}
Model.Playable.prototype = new Model.Element();
@@ -815,17 +819,6 @@
Model.Mashup.prototype = new Model.Playable();
-Model.Mashup.prototype.checkLoaded = function() {
- var loaded = !!this.segments.length;
- this.getMedias().forEach(function(_m) {
- loaded = loaded && _m.loaded;
- });
- this.loaded = loaded;
- if (loaded) {
- this.trigger("loadedmetadata");
- }
-}
-
Model.Mashup.prototype.updateTimes = function() {
var _time = 0;
this.segments.forEach(function(_segment) {
--- a/src/hashcut/static/hashcut/bpi/css/common.css Thu Jan 17 17:21:51 2013 +0100
+++ b/src/hashcut/static/hashcut/bpi/css/common.css Tue Jan 29 17:26:56 2013 +0100
@@ -340,7 +340,7 @@
}
/* popin - user - signup */
-.signup-button, .logout-button{
+.signup-button{
background-color: #de2500;
}
.user .popin-content{
--- a/src/hashcut/static/hashcut/iri/css/common.css Thu Jan 17 17:21:51 2013 +0100
+++ b/src/hashcut/static/hashcut/iri/css/common.css Tue Jan 29 17:26:56 2013 +0100
@@ -340,7 +340,7 @@
}
/* popin - user - signup */
-.signup-button, .logout-button{
+.signup-button{
background-color: #de2500;
}
.user .popin-content{
--- a/src/hashcut/static/hashcut/js/hashcut.js Thu Jan 17 17:21:51 2013 +0100
+++ b/src/hashcut/static/hashcut/js/hashcut.js Tue Jan 29 17:26:56 2013 +0100
@@ -589,6 +589,7 @@
this.volume = .5;
this.paused = true;
this.muted = false;
+ this.loadedMetadata = false;
var _this = this;
this.on("play", function() {
_this.paused = false;
@@ -613,6 +614,9 @@
_this.trigger("enter-annotation",_a);
});
});
+ this.on("loadedmetadata", function() {
+ _this.loadedMetadata = true;
+ })
}
Model.Playable.prototype = new Model.Element();
@@ -856,17 +860,6 @@
Model.Mashup.prototype = new Model.Playable();
-Model.Mashup.prototype.checkLoaded = function() {
- var loaded = !!this.segments.length;
- this.getMedias().forEach(function(_m) {
- loaded = loaded && _m.loaded;
- });
- this.loaded = loaded;
- if (loaded) {
- this.trigger("loadedmetadata");
- }
-}
-
Model.Mashup.prototype.updateTimes = function() {
var _time = 0;
this.segments.forEach(function(_segment) {
@@ -1895,7 +1888,6 @@
videourl = IriSP.video_url_transform(media.video);
}
var videoid = "video_" + media.id,
- videoEl = $('<video>'),
width = $(".video").width(),
height = $(".video").height(),
mp4_file = videourl.replace(/\.webm$/i,'.mp4'),
@@ -2055,7 +2047,9 @@
if (media === currentMedia) {
seekdiv.hide();
}
- mashup.checkLoaded();
+ if (mashup === currentMedia && media === mashup.currentMedia) {
+ changeCurrentAnnotation();
+ }
});
media.on("play", function() {
@@ -2250,9 +2244,6 @@
seekdiv.show();
}
}
- if (currentMedia.elementType === "mashup") {
- mashup.checkLoaded();
- }
$(".Ldt-Ctrl-Time-Total").text(currentMedia.duration.toString());
currentMedia.trigger("timeupdate",currentMedia.getCurrentTime());
currentMedia.trigger("pause");