--- a/src/js/init.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/init.js Tue Jun 26 14:22:29 2012 +0200
@@ -130,8 +130,32 @@
IriSP.Metadataplayer.prototype.onVideoDataLoaded = function() {
if (typeof this.videoData !== "undefined" && typeof this.config.player.video === "undefined") {
- var _media = this.videoData.currentMedia;
- if (typeof _media !== "undefined") {
+
+ var _media;
+
+ if (typeof this.videoData.mainMedia !== "undefined") {
+ _media = this.videoData.getElement(this.videoData.mainMedia);
+ }
+
+ if (this.config.player.type === "mashup" || this.config.player.type === "mashup-html") {
+ if (typeof _media === "undefined" || _media.elementType !== "mashup") {
+ var _mashups = this.videoData.getMashups();
+ if (_mashups.length) {
+ _media = _mashups[0];
+ }
+ }
+ } else {
+ if (typeof _media === "undefined" || _media.elementType !== "media") {
+ var _medias = this.videoData.getMedias();
+ if (_medias.length) {
+ _media = _medias[0];
+ }
+ }
+ }
+
+ this.videoData.currentMedia = _media;
+
+ if (typeof _media !== "undefined" && typeof _media.video !== "undefined") {
this.config.player.video = _media.video;
if (typeof _media.streamer !== "undefined") {
this.config.player.streamer = _media.streamer;
--- a/src/js/model.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/model.js Tue Jun 26 14:22:29 2012 +0200
@@ -660,18 +660,6 @@
return this.directory.getElement(_elId);
}
-IriSP.Model.Source.prototype.setCurrentMediaId = function(_idRef) {
- if (typeof _idRef !== "undefined") {
- this.currentMedia = this.getElement(_idRef);
- }
-}
-
-IriSP.Model.Source.prototype.setDefaultCurrentMedia = function() {
- if (typeof this.currentMedia === "undefined" && this.getMedias().length) {
- this.currentMedia = this.getMedias()[0];
- }
-}
-
IriSP.Model.Source.prototype.get = function() {
this.status = IriSP.Model._SOURCE_STATUS_WAITING;
this.handleCallbacks();
--- a/src/js/players/player.allocine.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/players/player.allocine.js Tue Jun 26 14:22:29 2012 +0200
@@ -77,13 +77,11 @@
this.player = document.getElementById(this.container);
this.player.addEventListener("onStateChange", "onAllocineStateChange");
this.player.cueVideoByUrl(this._options.video);
- this.callbacks.onReady();
+ this.trigger("loadedmetadata");
};
IriSP.PopcornReplacement.allocine.prototype.progressHandler = function(progressInfo) {
- this.callbacks.onTime({
- position: progressInfo.mediaTime
- });
+ this.trigger("timeupdate");
}
@@ -105,27 +103,18 @@
}
IriSP.PopcornReplacement.allocine.prototype.stateHandler = function(state) {
- console.log("stateHandler");
switch(state) {
case 1:
- this.callbacks.onPlay();
+ this.trigger("play");
break;
case 2:
- this.callbacks.onPause();
+ this.trigger("pause");
break;
case 3:
- this.callbacks.onSeek({
- position: this.player.getCurrentTime()
- });
+ this.trigger("seeked");
break;
-
- /*
- case 5:
- this.callbacks.onReady();
- break;
- */
}
};
\ No newline at end of file
--- a/src/js/players/player.dailymotion.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/players/player.dailymotion.js Tue Jun 26 14:22:29 2012 +0200
@@ -109,31 +109,26 @@
this.player.addEventListener("onVideoProgress", "onDailymotionVideoProgress");
this.player.cueVideoByUrl(this._options.video);
- this.callbacks.onReady();
+ this.trigger("loadedmetadata");
};
IriSP.PopcornReplacement.dailymotion.prototype.onProgress = function(progressInfo) {
-
- this.callbacks.onTime({
- position: progressInfo.mediaTime
- });
+ this.trigger("timeupdate");
}
IriSP.PopcornReplacement.dailymotion.prototype.onStateChange = function(state) {
switch(state) {
case 1:
- this.callbacks.onPlay();
+ this.trigger("play");
break;
case 2:
- this.callbacks.onPause();
+ this.trigger("pause");
break;
case 3:
- this.callbacks.onSeek({
- position: this.player.getCurrentTime()
- });
+ this.trigger("seeked");
break;
}
--- a/src/js/players/player.jwplayer.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/players/player.jwplayer.js Tue Jun 26 14:22:29 2012 +0200
@@ -8,12 +8,13 @@
this.media.duration = options.duration; /* optional */
- var _player = jwplayer(this.container);
+ var _player = jwplayer(this.container),
+ _this = this;
/* Définition des fonctions de l'API - */
this.playerFns = {
- play: function() { return _player.play(); },
- pause: function() { return _player.pause(); },
+ play: function() { return _player.play(true); },
+ pause: function() { return _player.pause(true); },
getPosition: function() { return _player.getPosition(); },
seek: function(pos) { return _player.seek(pos); },
getMute: function() { return _player.getMute() },
@@ -22,7 +23,23 @@
setVolume: function(p) { return _player.setVolume(Math.floor(100*p)); }
}
- options.events = this.callbacks;
+ options.events = {
+ onReady: function() {
+ _this.trigger("loadedmetadata");
+ },
+ onTime: function() {
+ _this.trigger("timeupdate");
+ },
+ onPlay: function() {
+ _this.trigger("play");
+ },
+ onPause: function() {
+ _this.trigger("pause");
+ },
+ onSeek: function() {
+ _this.trigger("seeked");
+ }
+ };
_player.setup(options);
};
--- a/src/js/players/player.mashup-html.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/players/player.mashup-html.js Tue Jun 26 14:22:29 2012 +0200
@@ -15,11 +15,15 @@
IriSP._(metadata.currentMedia.medias).each(function(_media) {
var _tmpId = Popcorn.guid("video"),
- _videoEl = IriSP.jQuery('<video>');
-
+ _videoEl = IriSP.jQuery('<video>'),
+ _videoUrl = _media.video;
+ if (typeof options.url_transform === "function") {
+ _videoUrl = options.url_transform(_videoUrl);
+ }
+
_videoEl
.attr({
- src : _media.video,
+ src : _videoUrl,
id : _tmpId,
width : _w,
height : _h
@@ -33,27 +37,39 @@
_this.$.append(_videoEl);
_media.videoEl = _videoEl;
_media.popcorn = Popcorn("#" + _tmpId);
+ _media.loadedMetadata = false;
+ _media.popcorn.on("loadedmetadata", function() {
+ _media.loadedMetadata = true;
+ var _allLoaded = true;
+ for (var _i = 0; _i < metadata.currentMedia.medias.length; _i++) {
+ _allLoaded = _allLoaded && metadata.currentMedia.medias[_i].loadedMetadata;
+ }
+ if (_allLoaded) {
+ _this.changeCurrentAnnotation();
+ _this.trigger("loadedmetadata");
+ }
+ });
_media.popcorn.on("timeupdate", function() {
if (!_this.media.paused && _media === _this.currentMedia) {
- var _time = _media.popcorn.currentTime();
- // var _status = "Timeupdate from " + _media.id + " at time " + _time;
+ var _time = Math.round( 1000 * _media.popcorn.currentTime() );
+// var _status = "Timeupdate from " + _media.id + " at time " + _time;
if ( _time < _this.segmentEnd ) {
if ( _time >= _this.segmentBegin ) {
_this.timecode = _time - _this.timedelta;
- // _status += " within segment";
+// _status += " within segment";
} else {
_this.timecode = _this.segmentBegin - _this.timedelta;
- _media.popcorn.currentTime(_this.segmentBegin);
- // _status += " before segment begin";
+ _media.popcorn.currentTime(_this.segmentBegin / 1000);
+// _status += " before segment";
}
} else {
_this.timecode = _this.segmentEnd - _this.timedelta;
_media.popcorn.pause();
_this.changeCurrentAnnotation();
- // _status += " after segment end";
+// _status += " after segment";
}
- /* _status += ", translated to " + _this.timecode;
- console.log(_status); */
+// _status += " (" + _this.segmentBegin + " to " + _this.segmentEnd + ")" + ", translated to " + _this.timecode;
+// console.log(_status);
_this.trigger("timeupdate");
}
});
@@ -70,17 +86,19 @@
_this.currentMedia.popcorn.pause();
},
getPosition: function() {
- return _this.timecode;
+ return _this.timecode / 1000;
},
seek: function(pos) {
- _this.timecode = pos;
+ _this.timecode = Math.round(pos * 1000);
_this.changeCurrentAnnotation();
},
getMute: function() {
- return
+ var _res = (
typeof _this.currentMedia !== "undefined"
? _this.currentMedia.popcorn.muted()
- : false;
+ : false
+ );
+ return _res;
},
setMute: function(p) {
var _mute = !!p;
@@ -89,10 +107,12 @@
}
},
getVolume: function() {
- return
+ var _res = (
typeof _this.currentMedia !== "undefined"
? _this.currentMedia.popcorn.volume()
- : .5;
+ : .5
+ );
+ return _res;
},
setVolume: function(_vol) {
for (var _i = 0; _i < _this.mashup.medias.length; _i++) {
@@ -100,29 +120,28 @@
}
}
}
-/*
- options.events = this.callbacks;
-
- _player.setup(options);
- */
+
};
IriSP.PopcornReplacement.htmlMashup.prototype = new IriSP.PopcornReplacement.player("", {});
IriSP.PopcornReplacement.htmlMashup.prototype.changeCurrentAnnotation = function() {
- var _annotation = this.mashup.getAnnotationAtTime( 1000 * this.timecode );
+ var _annotation = this.mashup.getAnnotationAtTime( this.timecode );
if (typeof _annotation == "undefined") {
if (typeof this.currentMedia !== "undefined") {
this.currentMedia.popcorn.pause();
- this.media.paused = true;
+ if (!this.media.paused) {
+ this.media.paused = true;
+ this.trigger("pause");
+ }
}
return;
}
if (_annotation !== this.currentAnnotation) {
this.currentAnnotation = _annotation;
- this.segmentBegin = this.currentAnnotation.annotation.begin.getSeconds();
- this.segmentEnd = this.currentAnnotation.annotation.end.getSeconds();
- this.timedelta = this.segmentBegin - this.currentAnnotation.begin.getSeconds();
+ this.segmentBegin = this.currentAnnotation.annotation.begin.milliseconds;
+ this.segmentEnd = this.currentAnnotation.annotation.end.milliseconds;
+ this.timedelta = this.segmentBegin - this.currentAnnotation.begin.milliseconds;
this.currentMedia = this.currentAnnotation.getMedia();
for (var _i = 0; _i < this.mashup.medias.length; _i++) {
@@ -133,9 +152,28 @@
this.mashup.medias[_i].videoEl.show();
}
}
+/* PRELOADING */
+ var _this = this,
+ _preloadedMedias = [],
+ _toPreload = this.mashup.getAnnotations().filter(function(_a) {
+ return (_a.begin >= _this.currentAnnotation.end && _a.getMedia().id !== _this.currentMedia.id);
+ });
+ IriSP._(_toPreload).each(function(_a) {
+ var _media = _a.getMedia();
+ if (IriSP._(_preloadedMedias).indexOf(_media.id) === -1) {
+ _preloadedMedias.push(_media.id);
+ _media.popcorn.currentTime(_a.annotation.begin.getSeconds());
+ //console.log("Preloading ", _media.id, " at t=", _a.annotation.begin.getSeconds());
+ }
+ });
+
+// console.log("Changed segment: media="+ this.currentMedia.id + ", from=" + this.segmentBegin + " to=" + this.segmentEnd +", timedelta = ", this.timedelta)
+// } else {
+// console.log("changeCurrentAnnotation called, but segment hasn't changed");
}
if (this.currentMedia.popcorn.readyState()) {
- this.currentMedia.popcorn.currentTime(this.timecode + this.timedelta);
+ this.currentMedia.popcorn.currentTime( (this.timecode + this.timedelta) / 1000);
+ this.trigger("timeupdate");
}
if (!this.media.paused) {
this.currentMedia.popcorn.play();
--- a/src/js/players/player.mashup.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/players/player.mashup.js Tue Jun 26 14:22:29 2012 +0200
@@ -5,7 +5,7 @@
IriSP.PopcornReplacement.mashup = function(container, options) {
/* Appel du constructeur de la classe parente */
IriSP.PopcornReplacement.player.call(this, container, options);
-
+
var _this = this;
/* Définition des fonctions de commande :
@@ -108,35 +108,28 @@
IriSP.PopcornReplacement.mashup.prototype = new IriSP.PopcornReplacement.player("", {});
IriSP.PopcornReplacement.mashup.prototype.onReady = function() {
-
this.player = document.getElementById(this.container);
-
- this.callbacks.onReady();
+ this.trigger("loadedmetadata");
};
IriSP.PopcornReplacement.mashup.prototype.onProgress = function(progressInfo) {
-
- this.callbacks.onTime({
- position: progressInfo.mediaTime
- });
+ this.trigger("timeupdate");
}
IriSP.PopcornReplacement.mashup.prototype.onStateChange = function(state) {
-
+
switch(state) {
case 1:
- this.callbacks.onPlay();
+ this.trigger("play");
break;
case 2:
- this.callbacks.onPause();
+ this.trigger("pause");
break;
case 3:
- this.callbacks.onSeek({
- position: this.player.getCurrentTime()
- });
+ this.trigger("seeked");
break;
}
-
+
};
\ No newline at end of file
--- a/src/js/pop.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/pop.js Tue Jun 26 14:22:29 2012 +0200
@@ -1,64 +1,47 @@
/* wrapper that simulates popcorn.js because
popcorn is a bit unstable at the time */
+/* Popcorn.code replacement has been disabled. It didn't work properly and was not even used */
+
IriSP.PopcornReplacement = {
};
/** base class for our popcorn-compatible players.
*/
IriSP.PopcornReplacement.player = function(container, options) {
- /* the jwplayer calls the callbacks in the global space so we need to
- preserve them this way */
- if (typeof IriSP._ === "undefined") {
- return;
- }
+
+ this.media = {
+ "paused": true,
+ "muted": false
+ };
- this.callbacks = {
- onReady: IriSP._.bind(this.__initApi, this),
- onTime: IriSP._.bind(this.__timeHandler, this),
- onPlay: IriSP._.bind(this.__playHandler, this),
- onPause: IriSP._.bind(this.__pauseHandler, this),
- onSeek: IriSP._.bind(this.__seekHandler, this)
- };
-
- this.media = {
- "paused": true,
- "muted": false
- };
-
- this.container = container.replace(/^#/,''); //eschew the '#'
-
- this.msgPump = {}; /* dictionnary used to receive and send messages */
- this.__codes = []; /* used to schedule the execution of a piece of code in
- a segment (similar to the popcorn.code plugin). */
-
- this._options = options;
+ this.container = container.replace(/^#/,''); //remove '#' at beginning
+ this.msgPump = {}; /* dictionnary used to receive and send messages */
+ this._options = options;
};
IriSP.PopcornReplacement.player.prototype.listen = function(msg, callback) {
- if (!this.msgPump.hasOwnProperty(msg))
- this.msgPump[msg] = [];
-
- this.msgPump[msg].push(callback);
+ if (!this.msgPump.hasOwnProperty(msg)) {
+ this.msgPump[msg] = [];
+ }
+ this.msgPump[msg].push(callback);
};
IriSP.PopcornReplacement.player.prototype.on = IriSP.PopcornReplacement.player.prototype.listen;
IriSP.PopcornReplacement.player.prototype.trigger = function(msg, params) {
- if (!this.msgPump.hasOwnProperty(msg))
- return;
-
- var d = this.msgPump[msg];
-
- for(var i = 0; i < d.length; i++) {
- d[i].call(window, params);
- }
-
+ if (!this.msgPump.hasOwnProperty(msg)) {
+ return;
+ }
+ var d = this.msgPump[msg];
+ for(var i = 0; i < d.length; i++) {
+ d[i].call(window, params);
+ }
};
IriSP.PopcornReplacement.player.prototype.emit = IriSP.PopcornReplacement.player.prototype.trigger;
-
+/*
IriSP.PopcornReplacement.player.prototype.guid = function(prefix) {
var str = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
@@ -70,12 +53,12 @@
/** init the api after that flash player has been setup - called by the callback
defined by the embedded flash player
-*/
+
IriSP.PopcornReplacement.player.prototype.__initApi = function() {
this.trigger("loadedmetadata"); // we've done more than loading metadata of course,
// but popcorn doesn't need to know more.
this.media.muted = this.playerFns.getMute();
- /* some programmed segments are supposed to be run at the beginning */
+ /* some programmed segments are supposed to be run at the beginning
var i = 0;
for(i = 0; i < this.__codes.length; i++) {
var c = this.__codes[i];
@@ -87,7 +70,9 @@
c.onEnd();
}
}
+
};
+*/
IriSP.PopcornReplacement.player.prototype.currentTime = function(time) {
if (typeof(time) === "undefined") {
@@ -107,7 +92,7 @@
IriSP.PopcornReplacement.player.prototype.pause = function() {
this.media.paused = true;
- this.trigger( "pause" );
+ this.trigger("pause");
this.playerFns.pause();
};
@@ -156,74 +141,6 @@
this.muted(false);
}
-IriSP.PopcornReplacement.player.prototype.code = function(options) {
- this.__codes.push(options);
- return this;
-};
-
-/* called everytime the player updates itself
- (onTime event)
- */
-
-IriSP.PopcornReplacement.player.prototype.__timeHandler = function(event) {
- var pos = event.position;
-
- var i = 0;
- for(i = 0; i < this.__codes.length; i++) {
- var c = this.__codes[i];
-
- if (pos >= c.start && pos < c.end &&
- pos - 1 <= c.start) {
- c.onStart();
- }
-
- if (pos > c.start && pos > c.end &&
- pos - 1 <= c.end) {
- c.onEnd();
- }
-
- }
-
- this.trigger("timeupdate");
-};
-
-IriSP.PopcornReplacement.player.prototype.__seekHandler = function(event) {
- var i = 0;
-
- for(i = 0; i < this.__codes.length; i++) {
- var c = this.__codes[i];
-
- if (event.position >= c.start && event.position < c.end) {
- c.onEnd();
- }
- }
-
- for(i = 0; i < this.__codes.length; i++) {
- var c = this.__codes[i];
-
- if (typeof(event.offset) === "undefined")
- event.offset = 0;
-
- if (event.offset >= c.start && event.offset < c.end) {
- c.onStart();
- }
-
- }
-
- /* this signal sends as an extra argument the position in the video.
- As far as I know, this argument is not provided by popcorn */
- this.trigger("seeked", event.offset);
-};
-
-IriSP.PopcornReplacement.player.prototype.__playHandler = function(event) {
- this.media.paused = false;
- this.trigger("play");
-};
-
-IriSP.PopcornReplacement.player.prototype.__pauseHandler = function(event) {
- this.media.paused = true;
- this.trigger("pause");
-};
IriSP.PopcornReplacement.player.prototype.roundTime = function() {
var currentTime = this.currentTime();
--- a/src/js/serializers/ldt.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/js/serializers/ldt.js Tue Jun 26 14:22:29 2012 +0200
@@ -134,23 +134,30 @@
}
},
mashup : {
- serialized_name : "mashups",
+ serialized_name : "lists",
deserializer : function(_data, _source) {
+ if (typeof _data.meta !== "object" || typeof _data.meta.listtype !== "string" || _data.meta.listtype !== "mashup") {
+ return undefined;
+ }
var _res = new IriSP.Model.Mashup(_data.id, _source);
_res.title = _data.meta["dc:title"];
_res.description = _data.meta["dc:description"];
- for (var _i = 0; _i < _data.segments.length; _i++) {
- _res.addSegmentById(_data.segments[_i]);
+ for (var _i = 0; _i < _data.items.length; _i++) {
+ _res.addSegmentById(_data.items[_i]);
}
return _res;
},
serializer : function(_data, _source) {
return {
- "dc:title": _data.title,
- "dc:description": _data.description,
- segments: _data.segments.map(function(_annotation) {
+ meta : {
+ "dc:title": _data.title,
+ "dc:description": _data.description,
+ listtype: "mashup"
+ },
+ items: _data.segments.map(function(_annotation) {
return _id;
- })
+ }),
+ id: _data.id
}
}
}
@@ -181,10 +188,16 @@
if (_listdata.hasOwnProperty("length")) {
var _l = _listdata.length;
for (var _i = 0; _i < _l; _i++) {
- _list.push(_type.deserializer(_listdata[_i], _source));
+ var _element = _type.deserializer(_listdata[_i], _source);
+ if (typeof _element !== "undefined" && _element) {
+ _list.push(_element);
+ }
}
} else {
- _list.push(_type.deserializer(_listdata, _source));
+ var _element = _type.deserializer(_listdata, _source);
+ if (typeof _element !== "undefined" && _element) {
+ _list.push(_element);
+ }
}
}
_source.addList(_typename, _list);
@@ -195,9 +208,8 @@
}
if (typeof _data.meta !== "undefined" && typeof _data.meta.main_media !== "undefined" && typeof _data.meta.main_media["id-ref"] !== "undefined") {
- _source.setCurrentMediaId(_data.meta.main_media["id-ref"]);
+ _source.mainMedia = _data.meta.main_media["id-ref"];
}
- _source.setDefaultCurrentMedia();
}
}
--- a/src/widgets/AnnotationsList.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/widgets/AnnotationsList.js Tue Jun 26 14:22:29 2012 +0200
@@ -107,7 +107,6 @@
begin : Math.max(0, _currentAnnotation.annotation.begin.milliseconds - this.ajax_granularity),
end : Math.min(_currentMedia.duration.milliseconds, _currentAnnotation.annotation.end.milliseconds + this.ajax_granularity)
});
- console.log("Getting", _url);
this.currentSource = this.player.loadMetadata(IriSP._.defaults({
"url" : _url
}, this.metadata));
--- a/src/widgets/Controller.js Wed Jun 20 18:41:41 2012 +0200
+++ b/src/widgets/Controller.js Tue Jun 26 14:22:29 2012 +0200
@@ -92,6 +92,7 @@
this.bindPopcorn("volumechange","volumeUpdater");
this.bindPopcorn("timeupdate","timeDisplayUpdater");
this.bindPopcorn("loadedmetadata","timeDisplayUpdater");
+ this.bindPopcorn("loadedmetadata","volumeUpdater");
this.bindPopcorn("IriSP.search.matchFound","searchMatch");
this.bindPopcorn("IriSP.search.noMatchFound","searchNoMatch");
this.bindPopcorn("IriSP.search.triggeredSearch","triggeredSearch");
@@ -139,8 +140,10 @@
function() {
_this.player.popcorn.trigger("IriSP.Player.MouseOut");
});
- setTimeout(this.functionWrapper("volumeUpdater"), 1000);
/* some players - including jwplayer - save the state of the mute button between sessions */
+
+ window.setTimeout(this.functionWrapper("volumeUpdater"), 1000);
+
};
/* Update the elasped time div */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/mashup/bab_files/mashup-local-html.json Tue Jun 26 14:22:29 2012 +0200
@@ -0,0 +1,506 @@
+{
+ "views": [
+ {
+ "id": "v_33227665-49F3-7111-2BC6-3C4B6E90411C",
+ "contents": ["c1a84ff8-e2b0-11e0-8472-00145ea49a02", "c4ff2454-9842-11e1-9f9f-00145ea4a2be"],
+ "annotation_types": ["c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67", "c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425"]
+ }, {
+ "meta": {
+ "stat": "1,1,1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
+ },
+ "id": "stat",
+ "contents": ["c4ff2454-9842-11e1-9f9f-00145ea4a2be"]
+ }
+ ],
+ "tags": [
+ {
+ "meta": {
+ "dc:title": "jeux vidéo"
+ },
+ "id": "jeux_video"
+ }, {
+ "meta": {
+ "dc:title": "intelligence collective"
+ },
+ "id": "intelligence_collective"
+ }, {
+ "meta": {
+ "dc:title": "gamification"
+ },
+ "id": "gamification"
+ }, {
+ "meta": {
+ "dc:title": "nouveaux médias"
+ },
+ "id": "nouveaux_medias"
+ }, {
+ "meta": {
+ "dc:title": "world wide web"
+ },
+ "id": "www"
+ }, {
+ "meta": {
+ "dc:title": "hypertexte"
+ },
+ "id": "hypertexte"
+ }, {
+ "meta": {
+ "dc:title": "données liées"
+ },
+ "id": "donnees_liees"
+ }, {
+ "meta": {
+ "dc:title": "données ouvertes"
+ },
+ "id": "donnees_ouvertes"
+ }
+ ],
+ "lists": [
+ {
+ "items": [
+ {
+ "id-ref": "c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425"
+ }
+ ],
+ "meta": {
+ "dc:contributor": "undefined",
+ "dc:created": "2012-05-11T15:08:00.342662",
+ "dc:creator": "undefined",
+ "id-ref": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
+ "dc:title": "Découpages personnels",
+ "editable": "false",
+ "dc:modified": "2012-05-11T15:08:00.342662",
+ "dc:description": ""
+ },
+ "id": "g_5665330A-7789-1E08-13C2-3C4D26B44EAF"
+ }, {
+ "items": [
+ {
+ "id-ref": "c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67"
+ }
+ ],
+ "meta": {
+ "dc:contributor": "undefined",
+ "dc:created": "2012-05-11T15:08:00.348445",
+ "dc:creator": "undefined",
+ "id-ref": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
+ "dc:title": "Découpages personnels",
+ "editable": "false",
+ "dc:modified": "2012-05-11T15:08:00.348445",
+ "dc:description": ""
+ },
+ "id": "g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E"
+ }, {
+
+ "items": ["s_48D417FA-D34B-C954-05F6-3C4B9392367E", "s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4", "s_471A1070-AAD9-32F6-1E1B-3C4D52B5E4B9", "s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234", "s_7EB7522B-82D7-4FD6-2C5F-3C4D6945539E", "s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F", "s_E8C653B6-2B35-B2D6-1040-3C4D75BDF31B", "s_971168A0-A9B3-064D-46B4-3C4D7FA5DFD5", "s_0DB7AABB-3973-9352-95DF-3C4BC3DCFB2D"],
+ "meta": {
+ "dc:contributor": "IRI",
+ "dc:creator": "IRI",
+ "dc:title": "Bout à bout 2",
+ "dc:modified": "2012-06-22T17:21:32.514507",
+ "dc:created": "2012-06-22T17:21:32.514507",
+ "listtype": "mashup",
+ "dc:description": ""
+ },
+ "id": "0"
+ }
+ ],
+ "medias": [
+ {
+ "origin": "0",
+ "url": "bab_files/rsln_jane_mcgonigal.mp4",
+ "http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0",
+ "meta": {
+ "dc:contributor": "IRI",
+ "item": {
+ "name": "streamer",
+ "value": "rtmp://media.iri.centrepompidou.fr/ddc_player/"
+ },
+ "dc:created": "2011-09-19T13:17:56.656743",
+ "dc:duration": 4127000,
+ "dc:creator": "IRI",
+ "dc:created.contents": "2012-02-13",
+ "dc:title": "RSLN - Jane McGonigal",
+ "dc:creator.contents": "IRI",
+ "dc:modified": "2012-02-13T11:55:33.052583",
+ "dc:description": "Regards sur le Numérique, 16 septembre 2011, Jane McGonigal. Comment le jeu vidéo va changer le monde ?"
+ },
+ "id": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
+ "unit": "ms"
+ }, {
+ "origin": "0",
+ "url": "bab_files/www2012_timbernerslee.mp4",
+ "http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0",
+ "meta": {
+ "dc:contributor": "IRI",
+ "item": {
+ "name": "streamer",
+ "value": "rtmp://media.iri.centrepompidou.fr/ddc_player/"
+ },
+ "dc:created": "2012-05-07T14:48:22.137437",
+ "dc:duration": 5245000,
+ "dc:creator": "IRI",
+ "dc:created.contents": "2012-05-07",
+ "dc:title": "WWW 2012 - Tim Berners-Lee",
+ "dc:creator.contents": "IRI",
+ "dc:modified": "2012-05-07T17:08:36.018270",
+ "dc:description": "World Wide Web Conference 2012, Wednesday 18/04, 11:00-12:30, Keynote by Tim Berners-Lee, graduate of Oxford University, inventor of the World Wide Web, an internet-based hypermedia initiative for global information sharing while at CERN, the European Particle Physics Laboratory, in 1989."
+ },
+ "id": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
+ "unit": "ms"
+ }
+ ],
+ "meta": {
+ "dc:contributor": "admin",
+ "dc:created": "2012-05-11T16:26:53.787298",
+ "dc:creator": "admin",
+ "main_media": {
+ "id-ref": "mashup-001"
+ },
+ "dc:description": "",
+ "dc:title": "test bout à bout",
+ "id": "5afd8bbe-9b75-11e1-9e5d-00145ea4a2be",
+ "dc:modified": "2012-05-11T16:37:30.246796"
+ },
+ "annotations": [
+ {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "First Segment from Jane McGonigal",
+ "img": {
+ "src": ""
+ },
+ "title": "McGonigal 1",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 420000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "end": 425000,
+ "tags": [
+ {
+ "id-ref": "jeux_video"
+ }, {
+ "id-ref": "gamification"
+ }
+ ],
+ "color": "16763904",
+ "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
+ "id": "s_48D417FA-D34B-C954-05F6-3C4B9392367E"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Second segment from Jane McGonigal",
+ "img": {
+ "src": ""
+ },
+ "title": "McGonigal 2",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 980096,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "end": 995096,
+ "tags": [
+ {
+ "id-ref": "nouveaux_medias"
+ }, {
+ "id-ref": "intelligence_collective"
+ }
+ ],
+ "color": "16763904",
+ "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
+ "id": "s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Third segment from Jane McGonigal",
+ "img": {
+ "src": ""
+ },
+ "title": "McGonigal 3",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 1833044,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "end": 1860044,
+ "tags": [
+ {
+ "id-ref": "jeux_video"
+ }
+ ],
+ "color": "16763904",
+ "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
+ "id": "s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Fourth segment from Jane McGonigal",
+ "img": {
+ "src": ""
+ },
+ "title": "McGonigal 4",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 2436996,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "end": 2460096,
+ "tags": [
+ {
+ "id-ref": "jeux_video"
+ }, {
+ "id-ref": "www"
+ }
+ ],
+ "color": "16763904",
+ "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
+ "id": "s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Fifth segment from Jane McGonigal",
+ "img": {
+ "src": ""
+ },
+ "title": "McGonigal 5",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 3240000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "end": 3250000,
+ "tags": [
+ {
+ "id-ref": "jeux_video"
+ }, {
+ "id-ref": "nouveaux_medias"
+ }, {
+ "id-ref": "gamification"
+ }
+ ],
+ "color": "16763904",
+ "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
+ "id": "s_0DB7AABB-3973-9352-95DF-3C4BC3DCFB2D"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "First Segment from Tim Berners-Lee",
+ "img": {
+ "src": ""
+ },
+ "title": "WWW 1",
+ "color": "10027008",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 370000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425",
+ "dc:created": "2012-05-11T15:08:00.342701",
+ "dc:modified": "2012-05-11T15:08:00.342701",
+ "dc:creator": "perso"
+ },
+ "end": 380000,
+ "tags": [
+ {
+ "id-ref": "hypertexte"
+ }, {
+ "id-ref": "www"
+ }, {
+ "id-ref": "donnees_ouvertes"
+ }, {
+ "id-ref": "donnees_liees"
+ }
+ ],
+ "color": "10027008",
+ "media": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
+ "id": "s_471A1070-AAD9-32F6-1E1B-3C4D52B5E4B9"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Second Segment from Tim Berners-Lee",
+ "img": {
+ "src": ""
+ },
+ "title": "WWW 2",
+ "color": "13369344",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 1090000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425",
+ "dc:created": "2012-05-11T15:08:00.342701",
+ "dc:modified": "2012-05-11T15:08:00.342701",
+ "dc:creator": "perso"
+ },
+ "end": 1105000,
+ "tags": null,
+ "color": "13369344",
+ "media": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
+ "id": "s_7EB7522B-82D7-4FD6-2C5F-3C4D6945539E"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Third segment from Tim Berners-Lee",
+ "img": {
+ "src": ""
+ },
+ "title": "WWW 3",
+ "color": "10027008",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 2030000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425",
+ "dc:created": "2012-05-11T15:08:00.342701",
+ "dc:modified": "2012-05-11T15:08:00.342701",
+ "dc:creator": "perso"
+ },
+ "end": 2035000,
+ "tags": [
+ {
+ "id-ref": "www"
+ }
+ ],
+ "color": "10027008",
+ "media": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
+ "id": "s_E8C653B6-2B35-B2D6-1040-3C4D75BDF31B"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Fourth Segment from Tim Berners-Lee",
+ "img": {
+ "src": "WWW 4"
+ },
+ "title": "",
+ "color": "10027008",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 2922000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425",
+ "dc:created": "2012-05-11T15:08:00.342701",
+ "dc:modified": "2012-05-11T15:08:00.342701",
+ "dc:creator": "perso"
+ },
+ "end": 2940000,
+ "tags": [
+ {
+ "id-ref": "hypertexte"
+ }
+ ],
+ "color": "10027008",
+ "media": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
+ "id": "s_971168A0-A9B3-064D-46B4-3C4D7FA5DFD5"
+ }
+ ],
+ "annotation-types": [
+ {
+ "dc:contributor": "perso",
+ "dc:creator": "perso",
+ "dc:title": "Mon découpage",
+ "id": "c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:description": "",
+ "dc:modified": "2012-05-11T15:08:00.348480"
+ }, {
+ "dc:contributor": "perso",
+ "dc:creator": "perso",
+ "dc:title": "Mon découpage",
+ "id": "c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425",
+ "dc:created": "2012-05-11T15:08:00.342701",
+ "dc:description": "",
+ "dc:modified": "2012-05-11T15:08:00.342701"
+ }
+ ],
+ "mashups": [
+ {
+ "id": "mashup-001",
+ "meta": {
+ "dc:title": "Example mashup",
+ "dc:description": "This is an example mashup"
+ },
+ "segments": ["s_48D417FA-D34B-C954-05F6-3C4B9392367E", "s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4", "s_471A1070-AAD9-32F6-1E1B-3C4D52B5E4B9", "s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234", "s_7EB7522B-82D7-4FD6-2C5F-3C4D6945539E", "s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F", "s_E8C653B6-2B35-B2D6-1040-3C4D75BDF31B", "s_971168A0-A9B3-064D-46B4-3C4D7FA5DFD5", "s_0DB7AABB-3973-9352-95DF-3C4BC3DCFB2D"]
+ }
+ ]
+}
\ No newline at end of file
--- a/test/mashup/bab_files/mashup.json Wed Jun 20 18:41:41 2012 +0200
+++ b/test/mashup/bab_files/mashup.json Tue Jun 26 14:22:29 2012 +0200
@@ -90,6 +90,19 @@
"dc:description": ""
},
"id": "g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E"
+ }, {
+
+ "items": ["s_48D417FA-D34B-C954-05F6-3C4B9392367E", "s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4", "s_471A1070-AAD9-32F6-1E1B-3C4D52B5E4B9", "s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234", "s_7EB7522B-82D7-4FD6-2C5F-3C4D6945539E", "s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F", "s_E8C653B6-2B35-B2D6-1040-3C4D75BDF31B", "s_971168A0-A9B3-064D-46B4-3C4D7FA5DFD5", "s_0DB7AABB-3973-9352-95DF-3C4BC3DCFB2D"],
+ "meta": {
+ "dc:contributor": "IRI",
+ "dc:creator": "IRI",
+ "dc:title": "Bout à bout 2",
+ "dc:modified": "2012-06-22T17:21:32.514507",
+ "dc:created": "2012-06-22T17:21:32.514507",
+ "listtype": "mashup",
+ "dc:description": ""
+ },
+ "id": "0"
}
],
"medias": [
--- a/test/mashup/moon.htm Wed Jun 20 18:41:41 2012 +0200
+++ b/test/mashup/moon.htm Tue Jun 26 14:22:29 2012 +0200
@@ -52,6 +52,7 @@
url: 'moon/moon.json',
format: 'ldt'
};
+var _canPlayMp4 = document.createElement('video').canPlayType('video/mp4');
var _config = {
gui: {
width : 630,
@@ -80,13 +81,17 @@
]
},
player:{
- type:'mashup-html',
- live: true,
+ type: 'mashup-html',
+ url_transform: function(_url) {
+ if (_canPlayMp4 == "maybe" || _canPlayMp4 == "probably") {
+ return _url.replace(/\.webm$/i,'.mp4');
+ } else {
+ return _url.replace(/\.mp4$/i,'.webm');
+ }
+
+ },
height: 350,
- width: 630,
- provider: "rtmp",
- mashup_swf : "bab_files/player_bab_ldt.swf",
- mashup_xml : "moon/moon.xml",
+ width: 630,
autostart: true,
metadata: _metadata
}
--- a/test/mashup/moon/moon.json Wed Jun 20 18:41:41 2012 +0200
+++ b/test/mashup/moon/moon.json Tue Jun 26 14:22:29 2012 +0200
@@ -1,7 +1,21 @@
{
"views": null,
"tags": null,
- "lists": null,
+ "lists": [
+ {
+ "items": ["segment-melies-001", "segment-atlas-001", "segment-melies-002", "segment-apollo-001", "segment-atlas-002", "segment-melies-003", "segment-atlas-003", "segment-melies-004", "segment-apollo-002"],
+ "meta": {
+ "dc:contributor": "IRI",
+ "dc:creator": "IRI",
+ "dc:title": "Bout à bout Lunaire",
+ "dc:modified": "2012-06-22T15:04:17.752880",
+ "dc:created": "2012-06-22T15:04:17.752880",
+ "listtype": "mashup",
+ "dc:description": ""
+ },
+ "id": "mashup-001"
+ }
+ ],
"medias": [
{
"origin": "0",
@@ -24,8 +38,7 @@
},
"id": "media-melies",
"unit": "ms"
- },
- {
+ }, {
"origin": "0",
"url": "moon/juno.webm",
"http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0",
@@ -46,8 +59,7 @@
},
"id": "media-atlas",
"unit": "ms"
- },
- {
+ }, {
"origin": "0",
"url": "moon/apollo.webm",
"http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0",
@@ -112,8 +124,7 @@
"color": "10485760",
"media": "media-melies",
"id": "segment-melies-001"
- },
- {
+ }, {
"content": {
"mimetype": "application/x-ldt-structured",
"description": "Le Voyage dans la Lune, Segment 2",
@@ -142,8 +153,7 @@
"color": "10485760",
"media": "media-melies",
"id": "segment-melies-002"
- },
- {
+ }, {
"content": {
"mimetype": "application/x-ldt-structured",
"description": "Le Voyage dans la Lune, Segment 3",
@@ -172,8 +182,7 @@
"color": "10485760",
"media": "media-melies",
"id": "segment-melies-003"
- },
- {
+ }, {
"content": {
"mimetype": "application/x-ldt-structured",
"description": "Le Voyage dans la Lune, Segment 4",
@@ -202,8 +211,7 @@
"color": "10485760",
"media": "media-melies",
"id": "segment-melies-004"
- },
- {
+ }, {
"content": {
"mimetype": "application/x-ldt-structured",
"description": "Lancement de la sonde Juno, Segment 1",
@@ -232,8 +240,7 @@
"color": "32768",
"media": "media-atlas",
"id": "segment-atlas-001"
- },
- {
+ }, {
"content": {
"mimetype": "application/x-ldt-structured",
"description": "Lancement de la sonde Juno, Segment 2",
@@ -262,8 +269,7 @@
"color": "32768",
"media": "media-atlas",
"id": "segment-atlas-002"
- },
- {
+ }, {
"content": {
"mimetype": "application/x-ldt-structured",
"description": "Lancement de la sonde Juno, Segment 3",
@@ -292,8 +298,7 @@
"color": "32768",
"media": "media-atlas",
"id": "segment-atlas-003"
- },
- {
+ }, {
"content": {
"mimetype": "application/x-ldt-structured",
"description": "Mission Apollo 11, Segment 1",
@@ -322,8 +327,7 @@
"color": "16763904",
"media": "media-apollo",
"id": "segment-apollo-001"
- },
- {
+ }, {
"content": {
"mimetype": "application/x-ldt-structured",
"description": "Mission Apollo 11, Segment 2",
@@ -363,8 +367,7 @@
"dc:created": "2012-05-11T15:08:00.348480",
"dc:description": "",
"dc:modified": "2012-05-11T15:08:00.348480"
- },
- {
+ }, {
"dc:contributor": "perso",
"dc:creator": "perso",
"dc:title": "Segments du Lancement de Juno",
@@ -372,8 +375,7 @@
"dc:created": "2012-05-11T15:08:00.348480",
"dc:description": "",
"dc:modified": "2012-05-11T15:08:00.348480"
- },
- {
+ }, {
"dc:contributor": "perso",
"dc:creator": "perso",
"dc:title": "Segments d'Apollo 11",
@@ -382,25 +384,5 @@
"dc:description": "",
"dc:modified": "2012-05-11T15:08:00.348480"
}
- ],
- "mashups": [
- {
- "id": "mashup-001",
- "meta": {
- "dc:title": "Example mashup",
- "dc:description": "This is an example mashup"
- },
- "segments": [
- "segment-melies-001",
- "segment-atlas-001",
- "segment-melies-002",
- "segment-apollo-001",
- "segment-atlas-002",
- "segment-melies-003",
- "segment-atlas-003",
- "segment-melies-004",
- "segment-apollo-002"
- ]
- }
]
}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/mashup/player-html.htm Tue Jun 26 14:22:29 2012 +0200
@@ -0,0 +1,117 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Preuve de concept Mashup</title>
+ <link rel="stylesheet" type="text/css" href="style.css" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <script type="text/javascript" src="../metadataplayer/LdtPlayer-core.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <div class="main-container">
+ <div class="header">
+ <h1>Hash Cut #</h1>
+ </div>
+ <div class="steps">
+ <h2>Créer un Hash-cut en 3 étapes :</h2>
+ <div class="steps-frame">
+ <div class="step">
+ <div class="step-icon step-1"></div>
+ <div class="step-title">S'inscrire et<br />créer un projet</div>
+ </div>
+ <div class="step-separator"></div>
+ <div class="step">
+ <div class="step-icon step-2"></div>
+ <div class="step-title">Découper et<br />Assembler</div>
+ </div>
+ <div class="step-separator"></div>
+ <div class="step active">
+ <div class="step-icon step-3"></div>
+ <div class="step-title">Partager et<br />regarder !</div>
+ </div>
+ </div>
+ </div>
+ <div class="colgauche">
+ <h2>Mon HashCut (ne fonctionne pas avec Firefox)</h2>
+ <hr />
+ <div id="LdtPlayer"></div>
+ </div>
+ <div class="coldroite">
+ <div id="mediaList"></div>
+ <h2>Annotations</h2>
+ <hr />
+ <div id="annotationList"></div>
+ </div>
+ <div class="footer">
+ <hr />
+ <p style="text-align: right;">© IRI 2012</p>
+ </div>
+ </div>
+ <script type="text/javascript">
+
+IriSP.libFiles.defaultDir = "../libs/";
+IriSP.widgetsDir = "../metadataplayer";
+IriSP.language = 'fr';
+var _metadata = {
+ url: 'bab_files/mashup.json',
+// url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/b2754186-a0c9-11e0-b8bd-00145ea49a02?callback=?',
+// url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/5afd8bbe-9b75-11e1-9e5d-00145ea4a2be?callback=?',
+ format: 'ldt'
+};
+var _canPlayMp4 = document.createElement('video').canPlayType('video/mp4');
+var _config = {
+ gui: {
+ width : 630,
+ container : 'LdtPlayer',
+ default_options: {
+ metadata: _metadata
+ },
+ css : '../metadataplayer/LdtPlayer-core.css',
+ widgets: [
+ { type: "Slider" },
+ { type: "Controller" },
+ {
+ type: "Segments",
+ annotation_type: false
+ },
+ { type: "Arrow" },
+ {
+ type: "Annotation",
+ annotation_type: false
+ },
+ {
+ type: "MediaList",
+ container: "mediaList"
+ },
+ {
+ type: "AnnotationsList",
+ container: "annotationList",
+ ajax_url: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?",
+ ajax_granularity: 30000,
+ limit_count: 3
+ },
+ { type: "Mediafragment" }
+ ]
+ },
+ player:{
+ type:'mashup-html',
+ url_transform: function(_url) {
+ var _transformed = _url.replace(/^rtmp:\/\/media.iri.centrepompidou.fr\/ddc_player\/(mp4:)?video\//i,"http://media.iri.centrepompidou.fr/video/");
+ if (!/\.mp4$/.test(_transformed)) {
+ _transformed += '.mp4';
+ }
+ if (_canPlayMp4 == "") {
+ _transformed = _transformed.replace(/\.mp4$/i,'.ogv');
+ }
+ return _transformed;
+ },
+ height: 350,
+ width: 630,
+ metadata: _metadata
+ }
+};
+
+_myPlayer = new IriSP.Metadataplayer(_config);
+
+ </script>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/mashup/player-local-html.htm Tue Jun 26 14:22:29 2012 +0200
@@ -0,0 +1,104 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Preuve de concept Mashup</title>
+ <link rel="stylesheet" type="text/css" href="style.css" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <script type="text/javascript" src="../metadataplayer/LdtPlayer-core.js" type="text/javascript"></script>
+ </head>
+ <body>
+ <div class="main-container">
+ <div class="header">
+ <h1>Hash Cut #</h1>
+ </div>
+ <div class="steps">
+ <h2>Créer un Hash-cut en 3 étapes :</h2>
+ <div class="steps-frame">
+ <div class="step">
+ <div class="step-icon step-1"></div>
+ <div class="step-title">S'inscrire et<br />créer un projet</div>
+ </div>
+ <div class="step-separator"></div>
+ <div class="step">
+ <div class="step-icon step-2"></div>
+ <div class="step-title">Découper et<br />Assembler</div>
+ </div>
+ <div class="step-separator"></div>
+ <div class="step active">
+ <div class="step-icon step-3"></div>
+ <div class="step-title">Partager et<br />regarder !</div>
+ </div>
+ </div>
+ </div>
+ <div class="colgauche">
+ <h2>Mon HashCut (ne fonctionne pas avec Firefox)</h2>
+ <hr />
+ <div id="LdtPlayer"></div>
+ </div>
+ <div class="coldroite">
+ <div id="mediaList"></div>
+ <h2>Annotations</h2>
+ <hr />
+ <div id="annotationList"></div>
+ </div>
+ <div class="footer">
+ <hr />
+ <p style="text-align: right;">© IRI 2012</p>
+ </div>
+ </div>
+ <script type="text/javascript">
+
+IriSP.libFiles.defaultDir = "../libs/";
+IriSP.widgetsDir = "../metadataplayer";
+IriSP.language = 'fr';
+var _metadata = {
+ url: 'bab_files/mashup-local-html.json',
+ format: 'ldt'
+};
+var _config = {
+ gui: {
+ width : 630,
+ container : 'LdtPlayer',
+ default_options: {
+ metadata: _metadata
+ },
+ css : '../metadataplayer/LdtPlayer-core.css',
+ widgets: [
+ { type: "Slider" },
+ { type: "Controller" },
+ {
+ type: "Segments",
+ annotation_type: false
+ },
+ { type: "Arrow" },
+ {
+ type: "Annotation",
+ annotation_type: false
+ },
+ {
+ type: "MediaList",
+ container: "mediaList"
+ },
+ {
+ type: "AnnotationsList",
+ container: "annotationList",
+ ajax_url: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?",
+ ajax_granularity: 30000,
+ limit_count: 3
+ },
+ { type: "Mediafragment" }
+ ]
+ },
+ player:{
+ type:'mashup-html',
+ height: 350,
+ width: 630,
+ metadata: _metadata
+ }
+};
+
+_myPlayer = new IriSP.Metadataplayer(_config);
+
+ </script>
+ </body>
+</html>
\ No newline at end of file
--- a/test/mashup/player.htm Wed Jun 20 18:41:41 2012 +0200
+++ b/test/mashup/player.htm Tue Jun 26 14:22:29 2012 +0200
@@ -53,6 +53,7 @@
IriSP.language = 'fr';
var _metadata = {
url: 'bab_files/mashup.json',
+// url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/b2754186-a0c9-11e0-b8bd-00145ea49a02?callback=?',
format: 'ldt'
};
var _config = {
--- a/test/mp4video.htm Wed Jun 20 18:41:41 2012 +0200
+++ b/test/mp4video.htm Tue Jun 26 14:22:29 2012 +0200
@@ -11,7 +11,7 @@
</head>
<body>
- <h1>Metadataplayer test with HTML5 / H.264 Video - Does not work with Firefox and Chrome</h1>
+ <h1>Metadataplayer test with HTML5 / H.264 Video - Does not work with Firefox</h1>
<div id="LdtPlayer"></div>
<div id="AnnotationsListContainer"></div>
<script type="text/javascript">