# HG changeset patch
# User veltr
# Date 1342023777 -7200
# Node ID e47ed8eb75cd203b7ce7619e40d943b32e09260c
# Parent 28efc97b5d7870164ff5c48d4a34af9c64fec62f
Adaptation for streamer bug on Ldt Platform
diff -r 28efc97b5d78 -r e47ed8eb75cd src/js/defaults.js
--- a/src/js/defaults.js Fri Jul 06 18:13:32 2012 +0200
+++ b/src/js/defaults.js Wed Jul 11 18:22:57 2012 +0200
@@ -44,7 +44,10 @@
Trace : {
noCss: true,
requires: "tracemanager"
- }
+ },
+ SlideShare: {
+ requires: "swfObject"
+ }
}
IriSP.guiDefaults = {
diff -r 28efc97b5d78 -r e47ed8eb75cd src/js/init.js
--- a/src/js/init.js Fri Jul 06 18:13:32 2012 +0200
+++ b/src/js/init.js Wed Jul 11 18:22:57 2012 +0200
@@ -236,7 +236,10 @@
var opts = IriSP.jQuery.extend({}, this.config.player);
delete opts.container;
delete opts.type;
- if (typeof opts.streamer !== "undefined") {
+ if (typeof opts.streamer === "function") {
+ opts.streamer = opts.streamer(opts.video);
+ }
+ if (typeof opts.streamer === "string") {
opts.video = opts.video.replace(opts.streamer,"");
}
opts.file = opts.video;
diff -r 28efc97b5d78 -r e47ed8eb75cd src/widgets/Segments.js
--- a/src/widgets/Segments.js Fri Jul 06 18:13:32 2012 +0200
+++ b/src/widgets/Segments.js Wed Jul 11 18:22:57 2012 +0200
@@ -41,7 +41,7 @@
_center = _left + _width / 2,
_fulltext = _annotation.title + ( _annotation.description ? ( '
' + _annotation.description ) : '' );
return {
- text : _fulltext.replace(/(^.{120,140})[\s].+$/,'$1…'),
+ text : _fulltext.replace(/(^.{120,140})[\s].+$/m,'$1…'),
color : ( typeof _annotation.color !== "undefined" && _annotation.color ? _annotation.color : _this.colors[_k % _this.colors.length] ),
beginseconds : _annotation.begin.getSeconds() ,
left : Math.floor( _left ),
diff -r 28efc97b5d78 -r e47ed8eb75cd src/widgets/Trace.js
--- a/src/widgets/Trace.js Fri Jul 06 18:13:32 2012 +0200
+++ b/src/widgets/Trace.js Wed Jul 11 18:22:57 2012 +0200
@@ -10,7 +10,8 @@
url: "http://traces.advene.org:5000/",
requestmode: 'GET',
syncmode: "sync",
- default_subject: "IRI"
+ default_subject: "IRI",
+ tracer: null
}
IriSP.Widgets.Trace.prototype.draw = function() {
@@ -47,13 +48,18 @@
_this.player.popcorn.listen(_listener, _f);
});
- this.tracer = window.tracemanager.init_trace("test", {
- url: this.url,
- requestmode: this.requestmode,
- syncmode: this.syncmode,
- default_subject: this.default_subject
- });
- this.tracer.trace("StartTracing", {});
+ if (!this.tracer) {
+
+ this.tracer = window.tracemanager.init_trace("test", {
+ url: this.url,
+ requestmode: this.requestmode,
+ syncmode: this.syncmode,
+ default_subject: this.default_subject
+ });
+
+ }
+
+ this.tracer.trace("TraceWidgetInit", {});
this.mouseLocation = '';
IriSP.jQuery(".Ldt-Widget").bind("click mouseover mouseout", function(_e) {
diff -r 28efc97b5d78 -r e47ed8eb75cd test/index.htm
--- a/test/index.htm Fri Jul 06 18:13:32 2012 +0200
+++ b/test/index.htm Wed Jul 11 18:22:57 2012 +0200
@@ -12,7 +12,8 @@