| author | veltr |
| Fri, 11 May 2012 19:22:13 +0200 | |
| branch | new-model |
| changeset 900 | 7673d645a8e0 |
| parent 898 | d05b8920dbaa |
| child 902 | 14022f1d49ab |
--- a/src/js/init.js Fri May 11 15:42:22 2012 +0200 +++ b/src/js/init.js Fri May 11 19:22:13 2012 +0200 @@ -156,7 +156,7 @@ spacerDiv = ret[1], _this = this, _types = { - "html5" : /\.(ogg|ogv|webm|mp4)$/, + "html5" : /\.(ogg|ogv|webm)$/, "youtube" : /^(https?:\/\/)?(www\.)?youtube\.com/, "dailymotion" : /^(https?:\/\/)?(www\.)?dailymotion\.com/ };
--- a/src/js/model.js Fri May 11 15:42:22 2012 +0200 +++ b/src/js/model.js Fri May 11 19:22:13 2012 +0200 @@ -66,6 +66,7 @@ this.directory = _directory; this.idIndex = []; if (typeof _directory == "undefined") { + console.trace(); throw "Error : new IriSP.Model.List(directory): directory is undefined"; } } @@ -73,15 +74,7 @@ IriSP.Model.List.prototype = new Array(); IriSP.Model.List.prototype.getElement = function(_id) { - var _index = IriSP._(this.idIndex).indexOf(_id); - if (_index !== -1) { - return this[_index]; - } else { - var _un = _id.replace(/.*:/); - return IriSP._(this.idIndex).find(function(_i) { - return _i.replace(/.*:/) === _un; - }); - } + return this[_id]; } IriSP.Model.List.prototype.hasId = function(_id) { @@ -109,6 +102,12 @@ } } +IriSP.Model.List.prototype.pluck = function(_key) { + return this.map(function(_value) { + return _value[_key]; + }); +} + /* We override Array's filter function because it doesn't return an IriSP.Model.List */ IriSP.Model.List.prototype.filter = function(_callback) { @@ -241,6 +240,12 @@ */ IriSP.Model.Time = function(_milliseconds) { + this.milliseconds = 0; + this.setMilliseconds(_milliseconds); +} + +IriSP.Model.Time.prototype.setMilliseconds = function(_milliseconds) { + var _ante = _milliseconds; switch(typeof _milliseconds) { case "string": this.milliseconds = parseFloat(_milliseconds); @@ -255,7 +260,7 @@ this.milliseconds = 0; } if (this.milliseconds === NaN) { - this.milliseconds = 0; + this.milliseconds = _ante; } } @@ -396,13 +401,24 @@ IriSP.Model.Media.prototype = new IriSP.Model.Element(); IriSP.Model.Media.prototype.setDuration = function(_durationMs) { - this.duration.milliseconds = _durationMs; + this.duration.setMilliseconds(_durationMs); } IriSP.Model.Media.prototype.getAnnotations = function() { return this.getRelated("annotation"); } +IriSP.Model.Media.prototype.getAnnotationsByTypeTitle = function(_title) { + var _annTypes = this.source.getAnnotationTypes().searchByTitle(_title).pluck("id"); + if (_annTypes.length) { + return this.getAnnotations().filter(function(_annotation) { + return IriSP._(_annTypes).indexOf(_annotation.getAnnotationType().id) !== -1; + }); + } else { + return new IriSP.Model.List(this.source.directory) + } +} + /* */ IriSP.Model.Tag = function(_id, _source) { @@ -442,11 +458,11 @@ IriSP.Model.Annotation.prototype = new IriSP.Model.Element(null); IriSP.Model.Annotation.prototype.setBegin = function(_beginMs) { - this.begin.milliseconds = _beginMs; + this.begin.setMilliseconds(_beginMs); } IriSP.Model.Annotation.prototype.setEnd = function(_beginMs) { - this.end.milliseconds = _beginMs; + this.end.setMilliseconds(_beginMs); } IriSP.Model.Annotation.prototype.setMedia = function(_idRef) { @@ -477,6 +493,10 @@ return this.getTags().getTitles(); } +IriSP.Model.Annotation.prototype.getDuration = function() { + return new IriSP.Model.Time(this.end.milliseconds - this.begin.milliseconds) +} + /* */ IriSP.Model.MashedAnnotation = function(_annotation, _offset) { @@ -484,10 +504,10 @@ this.elementType = 'mashedAnnotation'; this.annotation = _annotation; this.begin = new IriSP.Model.Time(_offset); - var _duration = (this.annotation.end - this.annotation.begin); - this.end = new IriSP.Model.Time(_offset + _duration) + this.end = new IriSP.Model.Time(_offset + _annotation.getDuration()); this.title = this.annotation.title; this.description = this.annotation.description; + this.color = this.annotation.color; } IriSP.Model.MashedAnnotation.prototype = new IriSP.Model.Element(null); @@ -514,15 +534,24 @@ IriSP.Model.Element.call(this, _id, _source); this.elementType = 'mashup'; this.duration = new IriSP.Model.Time(); - this.segments = new IriSP.Model.List(); - this.medias = new IriSP.Model.List(); + this.segments = new IriSP.Model.List(_source.directory); + this.medias = new IriSP.Model.List(_source.directory); } IriSP.Model.Mashup.prototype = new IriSP.Model.Element(); IriSP.Model.Mashup.prototype.addSegment = function(_annotation) { - this.segments.push(new IriSP.Model.MashedAnnotation(_annotation)); - this.medias.addElement(_annotation.getMedia()); + var _mashedAnnotation = new IriSP.Model.MashedAnnotation(_annotation, this.duration); + this.duration.setMilliseconds(_mashedAnnotation.end); + this.segments.push(_mashedAnnotation); + this.medias.push(_annotation.getMedia()); +} + +IriSP.Model.Mashup.prototype.addSegmentById = function(_elId) { + var _annotation = this.source.getElement(_elId); + if (typeof _annotation !== "undefined") { + this.addSegment(_annotation); + } } IriSP.Model.Mashup.prototype.getAnnotations = function() { @@ -532,6 +561,18 @@ IriSP.Model.Mashup.prototype.getMedias = function() { return this.medias; } + +IriSP.Model.Mashup.prototype.getAnnotationsByTypeTitle = function(_title) { + var _annTypes = this.source.getAnnotationTypes().searchByTitle(_title).pluck("id"); + if (_annTypes.length) { + return this.getAnnotations().filter(function(_annotation) { + return IriSP._(_annTypes).indexOf(_annotation.getAnnotationType().id) !== -1; + }); + } else { + return new IriSP.Model.List(this.source.directory) + } +} + /* */ IriSP.Model.Source = function(_config) { @@ -622,7 +663,7 @@ IriSP.Model.Source.prototype.setCurrentMediaId = function(_idRef) { if (typeof _idRef !== "undefined") { - this.currentMedia = this.getMedias().getElement(this.getNamespaced(_idRef).fullname); + this.currentMedia = this.getElement(_idRef); } } @@ -666,7 +707,6 @@ this.deferCallback(this.callbackQueue.splice(0,1)[0]); } } - IriSP.Model.Source.prototype.onLoad = function(_callback) { if (this.status === IriSP.Model._SOURCE_STATUS_READY) { this.deferCallback(_callback); @@ -693,6 +733,11 @@ return this.getList("media", _global); } +IriSP.Model.Source.prototype.getMashups = function(_global) { + _global = (typeof _global !== "undefined" && _global); + return this.getList("mashup", _global); +} + IriSP.Model.Source.prototype.getAnnotationTypes = function(_global) { _global = (typeof _global !== "undefined" && _global); return this.getList("annotationType", _global); @@ -759,18 +804,7 @@ } IriSP.Model.Directory.prototype.getElement = function(_id) { - var _res = this.elements[_id]; - if (typeof _res === "undefined") { - var _un = _id.replace(/.*:/), - _keys = IriSP._(this.elements).keys(); - _key = IriSP._(_keys).find(function(_i) { - return _i.replace(/.*:/) === _un; - }); - if (typeof _key !== "undefined") { - _res = this.elements[_key]; - } - } - return _res; + return this.elements[_id]; } IriSP.Model.Directory.prototype.addElement = function(_element) {
--- a/src/js/serializers/PlatformSerializer.js Fri May 11 15:42:22 2012 +0200 +++ b/src/js/serializers/PlatformSerializer.js Fri May 11 19:22:13 2012 +0200 @@ -123,6 +123,31 @@ }) } } + }, + mashup : { + serialized_name : "mashups", + model_name : "mashup", + deserializer : function(_data, _source) { + console.log("Before"); + var _res = new IriSP.Model.Mashup(_data.id, _source); + _res.title = _data.meta["dc:title"]; + _res.description = _data.meta["dc:description"]; + console.log(_data); + for (var _i = 0; _i < _data.segments.length; _i++) { + console.log("Adding segment "+_data.segments[_i]) + _res.addSegmentById(_data.segments[_i]); + } + return _res; + }, + serializer : function(_data, _source) { + return { + "dc:title": _data.title, + "dc:description": _data.description, + segments: _data.segments.map(function(_annotation) { + return _source.unNamespace(_id); + }) + } + } } }, serialize : function(_source) {
--- a/src/js/widgets.js Fri May 11 15:42:22 2012 +0200 +++ b/src/js/widgets.js Fri May 11 19:22:13 2012 +0200 @@ -101,7 +101,8 @@ } IriSP.Widgets.Widget.prototype.getWidgetAnnotations = function() { - return typeof this.annotation_type !== "undefined" && this.annotation_type ? this.source.getAnnotationsByTypeTitle(this.annotation_type) : this.source.getAnnotations(); + var _curmedia = this.source.currentMedia; + return typeof this.annotation_type !== "undefined" && this.annotation_type ? _curmedia.getAnnotationsByTypeTitle(this.annotation_type) : _curmedia.getAnnotations(); } /**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/mashup/bab_files/mashup.json Fri May 11 19:22:13 2012 +0200 @@ -0,0 +1,413 @@ +{ + "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": null, + "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" + } + ], + "medias": [ + { + "origin": "0", + "url": "rtmp://media.iri.centrepompidou.fr/ddc_player/video/ldtplatform/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": "" + }, + "id": "c1a84ff8-e2b0-11e0-8472-00145ea49a02", + "unit": "ms" + }, { + "origin": "0", + "url": "rtmp://media.iri.centrepompidou.fr/ddc_player/video/ldtplatform/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": "" + }, + "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": null, + "color": "16763904", + "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02", + "id": "s_48D417FA-D34B-C954-05F6-3C4B9392367E" + }, { + "content": { + "mimetype": "application/x-ldt-structured", + "description": "", + "img": { + "src": "" + }, + "title": "", + "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": null, + "color": "16763904", + "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02", + "id": "s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4" + }, { + "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": 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": null, + "color": "16763904", + "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02", + "id": "s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234" + }, { + "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": 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": null, + "color": "16763904", + "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02", + "id": "s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F" + }, { + "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": 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": null, + "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": null, + "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": null, + "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": null, + "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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/mashup/bab_files/mashup.xml Fri May 11 19:22:13 2012 +0200 @@ -0,0 +1,133 @@ +<?xml version='1.0' encoding='utf-8'?> +<iri xmlns:dc="http://dublincore.org/documents/dcmi-namespace/" ldtversion="1.6.3"> + <project id="5afd8bbe-9b75-11e1-9e5d-00145ea4a2be" user="admin" title="test bout à bout" abstract=""/> + <medias> + <media id="c1a84ff8-e2b0-11e0-8472-00145ea49a02" src="http://ldt.iri.centrepompidou.fr//static/media/ldt/c1a84ff8-e2b0-11e0-8472-00145ea49a02/c1a84ff8-e2b0-11e0-8472-00145ea49a02.iri" video="rtmp://media.iri.centrepompidou.fr/ddc_player/" pict="" extra=""/> + <media id="c4ff2454-9842-11e1-9f9f-00145ea4a2be" src="http://ldt.iri.centrepompidou.fr//static/media/ldt/c4ff2454-9842-11e1-9f9f-00145ea4a2be/c4ff2454-9842-11e1-9f9f-00145ea4a2be.iri" video="rtmp://media.iri.centrepompidou.fr/ddc_player/" pict="" extra=""/> + </medias> + <annotations> + <content id="c4ff2454-9842-11e1-9f9f-00145ea4a2be"> + <ensemble id="g_5665330A-7789-1E08-13C2-3C4D26B44EAF" idProject="5afd8bbe-9b75-11e1-9e5d-00145ea4a2be" title="Découpages personnels" author="undefined" abstract=""> + <decoupage id="c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425" author="perso"> + <title>Mon découpage</title> + <abstract/> + <elements> + <element id="s_471A1070-AAD9-32F6-1E1B-3C4D52B5E4B9" begin="370000" dur="10000" author="admin" date="2012-05-11T16:29:33" color="10027008" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + <element id="s_7EB7522B-82D7-4FD6-2C5F-3C4D6945539E" begin="1090000" dur="15000" author="admin" date="2012-05-11T16:30:39" color="13369344" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + <element id="s_E8C653B6-2B35-B2D6-1040-3C4D75BDF31B" begin="2030000" dur="5000" author="admin" date="2012-05-11T16:30:36" color="10027008" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + <element id="s_971168A0-A9B3-064D-46B4-3C4D7FA5DFD5" begin="2922000" dur="18000" author="admin" date="2012-05-11T16:30:33" color="10027008" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + </elements> + </decoupage> + </ensemble> + </content> + <content id="c1a84ff8-e2b0-11e0-8472-00145ea49a02"> + <ensemble id="g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E" idProject="5afd8bbe-9b75-11e1-9e5d-00145ea4a2be" title="Découpages personnels" author="undefined" abstract=""> + <decoupage id="c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67" author="perso"> + <title>Mon découpage</title> + <abstract/> + <elements> + <element id="s_48D417FA-D34B-C954-05F6-3C4B9392367E" begin="420000" dur="5000" author="admin" date="2012-05-11T16:27:53" color="16763904" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + <element id="s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4" begin="980096" dur="15000" author="admin" date="2012-05-11T16:32:08" color="16763904" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + <element id="s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234" begin="1833044" dur="27000" author="admin" date="2012-05-11T16:28:12" color="16763904" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + <element id="s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F" begin="2436996" dur="23100" author="admin" date="2012-05-11T16:28:18" color="16763904" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + <element id="s_0DB7AABB-3973-9352-95DF-3C4BC3DCFB2D" begin="3240000" dur="10000" author="admin" date="2012-05-11T16:28:26" color="16763904" src=""> + <title/> + <abstract/> + <audio source=""/> + <tags/> + </element> + </elements> + </decoupage> + </ensemble> + </content> + </annotations> + <displays> + <display id="v_33227665-49F3-7111-2BC6-3C4B6E90411C" title="Init view" idsel="c1a84ff8-e2b0-11e0-8472-00145ea49a02" tc="0" zoom="68" scroll="0" infoBAB=""> + <audio source=""/> + <content id="c1a84ff8-e2b0-11e0-8472-00145ea49a02"> + <decoupage idens="g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E" id="c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67" tagsSelect=""/> + </content> + <content id="c4ff2454-9842-11e1-9f9f-00145ea4a2be"> + <decoupage idens="g_5665330A-7789-1E08-13C2-3C4D26B44EAF" id="c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425" tagsSelect=""/> + </content> + </display> + </displays> + <edits> + <editing id="0" tags=""> + <title>Bout à bout 1</title> + <abstract/> + <edit id="edit1" tags=""> + <eList> + <inst ref="c1a84ff8-e2b0-11e0-8472-00145ea49a02|;|g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E|;|c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67|;||;||;|s_D673EC15-794D-49DA-8C7F-3C4FA26D31EB" begin="420" end="425" m="0" v="100" eBegin="0" eEnd="5" trId="0" trIc="0" trOd="0" trOc="0"/> + <inst ref="c1a84ff8-e2b0-11e0-8472-00145ea49a02|;|g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E|;|c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67|;||;||;|s_042EF890-7308-36B2-B062-3C50742B82DF" begin="980" end="995" m="0" v="100" eBegin="5" eEnd="20" trId="0" trIc="0" trOd="0" trOc="0"/> + <inst ref="c4ff2454-9842-11e1-9f9f-00145ea4a2be|;|g_5665330A-7789-1E08-13C2-3C4D26B44EAF|;|c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425|;||;||;|s_04198AE9-E293-3D75-02E7-3C50AE71F332" begin="370" end="380" m="1" v="100" eBegin="20" eEnd="30" trId="0" trIc="0" trOd="0" trOc="0"/> + <inst ref="c1a84ff8-e2b0-11e0-8472-00145ea49a02|;|g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E|;|c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67|;||;||;|s_6F2C6F16-30B4-FFAF-4570-3C50F05F55F7" begin="1833" end="1860" m="0" v="100" eBegin="30" eEnd="57" trId="0" trIc="0" trOd="0" trOc="0"/> + <inst ref="c4ff2454-9842-11e1-9f9f-00145ea4a2be|;|g_5665330A-7789-1E08-13C2-3C4D26B44EAF|;|c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425|;||;||;|s_EA82B8B1-2937-2C4D-D120-3C510AA3C604" begin="1090" end="1105" m="2" v="100" eBegin="57" eEnd="72" trId="0" trIc="0" trOd="0" trOc="0"/> + <inst ref="c1a84ff8-e2b0-11e0-8472-00145ea49a02|;|g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E|;|c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67|;||;||;|s_296D8184-D13B-3F5E-6227-3C517EFC3672" begin="2436" end="2459" m="0" v="100" eBegin="72" eEnd="95" trId="0" trIc="0" trOd="0" trOc="0"/> + <inst ref="c4ff2454-9842-11e1-9f9f-00145ea4a2be|;|g_5665330A-7789-1E08-13C2-3C4D26B44EAF|;|c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425|;||;||;|s_4DE6A596-1A2C-F204-E95C-3C519162E526" begin="2030" end="2035" m="1" v="100" eBegin="95" eEnd="100" trId="0" trIc="0" trOd="0" trOc="0"/> + <inst ref="c4ff2454-9842-11e1-9f9f-00145ea4a2be|;|g_5665330A-7789-1E08-13C2-3C4D26B44EAF|;|c_3D9A9B5D-E144-4920-A9CA-3C4D26B48425|;||;||;|s_E50BC064-9913-C603-F646-3C519D22AE91" begin="2922" end="2940" m="1" v="100" eBegin="100" eEnd="118" trId="0" trIc="0" trOd="0" trOc="0"/> + <inst ref="c1a84ff8-e2b0-11e0-8472-00145ea49a02|;|g_F84E6DE7-FB3E-4672-3E87-3C4B87BA959E|;|c_3B9ADA5A-DBB7-00AC-BA4E-3C4B87B9EA67|;||;||;|s_CA30F86A-51E2-4C4D-9B72-3C51A9A31A39" begin="3240" end="3250" m="0" v="100" eBegin="118" eEnd="128" trId="0" trIc="0" trOd="0" trOc="0"/> + </eList> + <caption/> + <audio/> + <mList> + <m ref="c1a84ff8-e2b0-11e0-8472-00145ea49a02" id="0" t="v" c="16763904"> + <content>rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/ldtplatform/rsln_jane_mcgonigal.mp4</content> + </m> + <m ref="c4ff2454-9842-11e1-9f9f-00145ea4a2be" id="1" t="v" c="10027008"> + <content>rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/ldtplatform/www2012_timbernerslee.mp4</content> + </m> + <m ref="c4ff2454-9842-11e1-9f9f-00145ea4a2be" id="2" t="v" c="13369344"> + <content>rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/ldtplatform/www2012_timbernerslee.mp4</content> + </m> + </mList> + </edit> + <edit id="edit2" tags=""> + <eList/> + <caption/> + <audio/> + <mList/> + </edit> + </editing> + </edits> +</iri>
--- a/test/mashup/player.htm Fri May 11 15:42:22 2012 +0200 +++ b/test/mashup/player.htm Fri May 11 19:22:13 2012 +0200 @@ -50,7 +50,7 @@ IriSP.widgetsDir = "../metadataplayer"; IriSP.jwplayer_swf_path = "../player.swf"; var _metadata = { - url: '../json/ldt-jwplayer.json', + url: 'bab_files/mashup.json', format: 'ldt' }; var _config = { @@ -64,9 +64,15 @@ widgets: [ { type: "Slider" }, { type: "Controller" }, - { type: "Segments" }, + { + type: "Segments", + annotation_type: false + }, { type: "Arrow" }, - { type: "Annotation" } + { + type: "Annotation", + annotation_type: false + } ] }, player:{ @@ -76,7 +82,7 @@ width: 620, provider: "rtmp", mashup_swf : "bab_files/player_bab_ldt.swf", - mashup_xml : "bab_files/yeelen_bab.ldt", + mashup_xml : "bab_files/mashup.xml", autostart: true } };