--- a/src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.js Wed Dec 12 17:49:57 2012 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.js Thu Dec 13 14:33:48 2012 +0100
@@ -389,9 +389,9 @@
* Nous remplissons les données de l'annotation générée à la volée
* ATTENTION: Si nous sommes sur un MASHUP, ces éléments doivent se référer AU MEDIA D'ORIGINE
* */
+ _annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
_annotation.setBegin(this.begin); /*Timecode de début */
_annotation.setEnd(this.end); /* Timecode de fin */
- _annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
_annotation.setAnnotationType(_annotationType.id); /* Id du type d'annotation */
if (this.show_title_field) {
--- a/src/ldt/ldt/static/ldt/metadataplayer/LdtPlayer-core.js Wed Dec 12 17:49:57 2012 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/LdtPlayer-core.js Thu Dec 13 14:33:48 2012 +0100
@@ -491,7 +491,8 @@
var _iexact = _iexact || false,
_rgxp = Model.regexpFromTextOrArray(_text, true);
return this.filter(function(_element) {
- return _rgxp.test(_element.description) || _rgxp.test(_element.title);
+ var keywords = (_element.keywords || _element.getTagTexts() || []).join(", ");
+ return _rgxp.test(_element.description) || _rgxp.test(_element.title) || _rgxp.test(keywords);
});
}
@@ -676,7 +677,7 @@
}
_res += pad(2, _hms.minutes) + ':' + pad(2, _hms.seconds);
if (showCs) {
- _res += "." + Math.round(_hms.milliseconds / 100)
+ _res += "." + Math.floor(_hms.milliseconds / 100)
}
return _res;
}
@@ -1252,12 +1253,12 @@
Model.Source.prototype.getList = function(_listId, _global) {
_global = (typeof _global !== "undefined" && _global);
- if (_global || typeof this.contents[_listId] === "undefined") {
+ if (_global) {
return this.directory.getGlobalList().filter(function(_e) {
return (_e.elementType === _listId);
});
} else {
- return this.contents[_listId];
+ return this.contents[_listId] || new IriSP.Model.List(this.directory);
}
}
@@ -1391,6 +1392,7 @@
url: this.url,
dataType: dataType,
data: urlparams,
+ traditional: true,
success: function(_result) {
_this.deSerialize(_result);
_this.handleCallbacks();
@@ -1491,6 +1493,9 @@
noCss: true,
requires: [ "popcorn" ]
},
+ HtmlPlayer: {
+ noCss: true
+ },
JwpPlayer: {
noCss: true,
requires: [ "jwplayer" ]
--- a/src/ldt/ldt/static/ldt/metadataplayer/Mediafragment.js Wed Dec 12 17:49:57 2012 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Mediafragment.js Thu Dec 13 14:33:48 2012 +0100
@@ -18,14 +18,15 @@
IriSP.Widgets.Mediafragment.prototype.draw = function() {
this.onMediaEvent("pause","setHashToTime");
- this.onMediaEvent("seeked","setHashToTime");
- this.goToHash();
var _this = this;
this.getWidgetAnnotations().forEach(function(_annotation) {
_annotation.on("click", function() {
_this.setHashToAnnotation(_annotation.id);
})
- })
+ });
+ this.player.on("widgets-loaded", function() {
+ _this.goToHash();
+ });
}
IriSP.Widgets.Mediafragment.prototype.setWindowHash = function(_hash) {
--- a/src/ldt/ldt/static/ldt/metadataplayer/Trace.js Wed Dec 12 17:49:57 2012 +0100
+++ b/src/ldt/ldt/static/ldt/metadataplayer/Trace.js Thu Dec 13 14:33:48 2012 +0100
@@ -16,22 +16,11 @@
}
IriSP.Widgets.Trace.prototype.draw = function() {
- this.lastEvent = "";
if (typeof window.tracemanager === "undefined") {
console.log("Tracemanager not found");
return;
}
var _this = this,
- _mdplisteners = {
- "search.open" : 0,
- "search.closed" : 0,
- "search" : 0,
- "search.cleared" : 0,
- "search.matchFound" : 0,
- "search.noMatchFound" : 0,
- "search.triggeredSearch" : 0,
- "TraceWidget.MouseEvents" : 0
- }
_medialisteners = {
"play" : 0,
"pause" : 0,
@@ -39,17 +28,8 @@
"seeked" : 0,
"play" : 0,
"pause" : 0,
- "timeupdate" : 2000
+ "timeupdate" : 10000
};
- IriSP._(_mdplisteners).each(function(_ms, _listener) {
- var _f = function(_arg) {
- _this.eventHandler(_listener, _arg);
- }
- if (_ms) {
- _f = IriSP._.throttle(_f, _ms);
- }
- _this.onMdpEvent(_listener, _f);
- });
IriSP._(_medialisteners).each(function(_ms, _listener) {
var _f = function(_arg) {
_this.eventHandler(_listener, _arg);
@@ -74,10 +54,10 @@
this.tracer.trace("TraceWidgetInit", {});
this.mouseLocation = '';
- IriSP.jQuery(".Ldt-Widget").on("click mouseover mouseout", ".Ldt-TraceMe", function(_e) {
+ IriSP.jQuery(".Ldt-Widget").on("click mouseenter mouseleave", ".Ldt-TraceMe", function(_e) {
var _target = IriSP.jQuery(this);
- var _widget = IriSP.jQuery(this).attr("widget-type"),
+ var _widget = _target.attr("widget-type") || _target.parents(".Ldt-Widget").attr("widget-type"),
_data = {
"type": _e.type,
"x": _e.clientX,
@@ -88,42 +68,16 @@
_class = _targetEl.className,
_name = _targetEl.localName,
_id = _targetEl.id,
- _value = _targetEl.value,
- _traceInfo = _target.attr("trace-info"),
- _lastTarget = _name + (_id && _id.length ? '#' + IriSP.jqEscape(_id) : '') + (_class && _class.length ? ('.' + IriSP.jqEscape(_class).replace(/\s/g,'.')).replace(/\.Ldt-(Widget|TraceMe)/g,'') : '');
- _data.target = _lastTarget
- if (typeof _traceInfo == "string" && _traceInfo.length) {
+ _value = _target.val(),
+ _traceInfo = _target.attr("trace-info");
+ _data.target = _name + (_id && _id.length ? '#' + IriSP.jqEscape(_id) : '') + (_class && _class.length ? ('.' + IriSP.jqEscape(_class).replace(/\s/g,'.')).replace(/\.Ldt-(Widget|TraceMe)/g,'') : '');
+ if (typeof _traceInfo == "string" && _traceInfo) {
_data.traceInfo = _traceInfo;
- _lastTarget += ( ";" + _traceInfo );
}
if (typeof _value == "string" && _value.length) {
_data.value = _value;
}
- switch(_e.type) {
- case "mouseover":
- if (_this.lastTarget != _lastTarget) {
- _this.player.trigger('TraceWidget.MouseEvents', _data);
- } else {
- if (typeof _this.moTimeout != "undefined") {
- clearTimeout(_this.moTimeout);
- _this.moTimeout = undefined;
- }
- }
- break;
- case "mouseout":
- if (typeof _this.moTimeout != "undefined") {
- clearTimeout(_this.moTimeout);
- }
- _this.moTimeout = setTimeout(function() {
- if (_lastTarget != _this.lastTarget) {
- _this.player.trigger('TraceWidget.MouseEvents', _data);
- }
- },100);
- break;
- default:
- _this.player.trigger('TraceWidget.MouseEvents', _data);
- }
- _this.lastTarget = _lastTarget;
+ _this.eventHandler('UIEvent', _data);
});
}
@@ -136,7 +90,7 @@
_arg = {}
}
switch(_listener) {
- case 'IriSP.TraceWidget.MouseEvents':
+ case 'UIEvent':
_traceName += _arg.widget + '_' + _arg.type;
delete _arg.widget;
delete _arg.type;
@@ -152,7 +106,6 @@
default:
_traceName += _listener.replace('.','_');
}
- this.lastEvent = _traceName;
if (typeof this.extend === "object" && this.extend) {
IriSP._(_arg).extend(this.extend);
}
@@ -160,4 +113,4 @@
if (this.js_console && typeof window.console !== "undefined" && typeof console.log !== "undefined") {
console.log("tracer.trace('" + _traceName + "', " + JSON.stringify(_arg) + ");");
}
-}
+}
\ No newline at end of file