# HG changeset patch
# User veltr
# Date 1340718822 -7200
# Node ID 4f1b7aa04ec791ab439792e1a8aba08f8c342e7a
# Parent 3cc57cb48aeae2d13a7d85245b70b2f4ea607aff
Added HTML5 Mashup
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/bab_files/mashup-local-html.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metadataplayer/mashup/bab_files/mashup-local-html.json Tue Jun 26 15:53:42 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
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/bab_files/mashup-local.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metadataplayer/mashup/bab_files/mashup-local.xml Tue Jun 26 15:53:42 2012 +0200
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+ Mon découpage
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mon découpage
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Bout à bout 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ rsln_jane_mcgonigal.mp4
+
+
+ www2012_timbernerslee.mp4
+
+
+ www2012_timbernerslee.mp4
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/bab_files/mashup.json
--- a/metadataplayer/mashup/bab_files/mashup.json Fri Jun 15 13:04:55 2012 +0200
+++ b/metadataplayer/mashup/bab_files/mashup.json Tue Jun 26 15:53:42 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": [
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/bab_files/player_bab_ldt.swf
Binary file metadataplayer/mashup/bab_files/player_bab_ldt.swf has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon.htm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metadataplayer/mashup/moon.htm Tue Jun 26 15:53:42 2012 +0200
@@ -0,0 +1,104 @@
+
+
+
+ Preuve de concept Mashup
+
+
+
+
+
+
+
+
+
Créer un Hash-cut en 3 étapes :
+
+
+
+
S'inscrire et
créer un projet
+
+
+
+
+
Découper et
Assembler
+
+
+
+
+
Partager et
regarder !
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/apollo.jpg
Binary file metadataplayer/mashup/moon/apollo.jpg has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/apollo.mp4
Binary file metadataplayer/mashup/moon/apollo.mp4 has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/apollo.webm
Binary file metadataplayer/mashup/moon/apollo.webm has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/atlas.jpg
Binary file metadataplayer/mashup/moon/atlas.jpg has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/juno.mp4
Binary file metadataplayer/mashup/moon/juno.mp4 has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/juno.webm
Binary file metadataplayer/mashup/moon/juno.webm has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/melies.jpg
Binary file metadataplayer/mashup/moon/melies.jpg has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/melies.mp4
Binary file metadataplayer/mashup/moon/melies.mp4 has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/melies.webm
Binary file metadataplayer/mashup/moon/melies.webm has changed
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/moon/moon.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metadataplayer/mashup/moon/moon.json Tue Jun 26 15:53:42 2012 +0200
@@ -0,0 +1,388 @@
+{
+ "views": null,
+ "tags": 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",
+ "url": "moon/melies.webm",
+ "http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0",
+ "meta": {
+ "dc:contributor": "IRI",
+ "dc:created": "2011-09-19T13:17:56.656743",
+ "dc:duration": 674000,
+ "dc:creator": "IRI",
+ "dc:created.contents": "2012-02-13",
+ "dc:title": "Le Voyage dans la Lune de Méliès",
+ "dc:creator.contents": "IRI",
+ "dc:modified": "2012-02-13T11:55:33.052583",
+ "dc:description": "Georges Méliès, 1902. Domaine public.",
+ "url": "http://en.wikipedia.org/wiki/File:Le_Voyage_dans_la_Lune_%28Georges_M%C3%A9li%C3%A8s,_1902%29.ogv",
+ "img": {
+ "src": "moon/melies.jpg"
+ }
+ },
+ "id": "media-melies",
+ "unit": "ms"
+ }, {
+ "origin": "0",
+ "url": "moon/juno.webm",
+ "http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0",
+ "meta": {
+ "dc:contributor": "IRI",
+ "dc:created": "2011-09-19T13:17:56.656743",
+ "dc:duration": 130000,
+ "dc:creator": "IRI",
+ "dc:created.contents": "2012-02-13",
+ "dc:title": "Launch of Juno!, NASA",
+ "dc:creator.contents": "IRI",
+ "dc:modified": "2012-02-13T11:55:33.052583",
+ "dc:description": "An Atlas V rocket lofted the Juno spacecraft toward Jupiter from Space Launch Complex-41. The 4-ton Juno spacecraft will take five years to reach Jupiter on a mission to study its structure and decipher its history. NASA, 2011. Domaine public.",
+ "url": "http://www.nasa.gov/multimedia/videogallery/index.html?media_id=105049051",
+ "img": {
+ "src": "moon/atlas.jpg"
+ }
+ },
+ "id": "media-atlas",
+ "unit": "ms"
+ }, {
+ "origin": "0",
+ "url": "moon/apollo.webm",
+ "http://advene.liris.cnrs.fr/ns/frame_of_reference/ms": "o=0",
+ "meta": {
+ "dc:contributor": "IRI",
+ "dc:created": "2011-09-19T13:17:56.656743",
+ "dc:duration": 137000,
+ "dc:creator": "IRI",
+ "dc:created.contents": "2012-02-13",
+ "dc:title": "Apollo 11 Overview, NASA",
+ "dc:creator.contents": "IRI",
+ "dc:modified": "2012-02-13T11:55:33.052583",
+ "dc:description": "Video highlights from the historic first manned landing on the moon, during the Apollo 11 mission in July 1969. NASA, 2011. Domaine public.",
+ "url": "http://www.nasa.gov/multimedia/videogallery/index.html?media_id=11463015",
+ "img": {
+ "src": "moon/apollo.jpg"
+ }
+ },
+ "id": "media-apollo",
+ "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": "To the Moon, feat. Méliès + NASA",
+ "id": "5afd8bbe-9b75-11e1-9e5d-00145ea4a2be",
+ "dc:modified": "2012-05-11T16:37:30.246796"
+ },
+ "annotations": [
+ {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Le Voyage dans la Lune, Segment 1",
+ "img": {
+ "src": ""
+ },
+ "title": "La capsule lunaire est chargée dans le canon permettant son lancement",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 301000,
+ "end": 306000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-melies",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "10485760",
+ "media": "media-melies",
+ "id": "segment-melies-001"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Le Voyage dans la Lune, Segment 2",
+ "img": {
+ "src": ""
+ },
+ "title": "Ordre de mise à feu du canon propulseur",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 314500,
+ "end": 316000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-melies",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "10485760",
+ "media": "media-melies",
+ "id": "segment-melies-002"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Le Voyage dans la Lune, Segment 3",
+ "img": {
+ "src": ""
+ },
+ "title": "La Lune se rapproche et dévoile son visage",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 344000,
+ "end": 347000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-melies",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "10485760",
+ "media": "media-melies",
+ "id": "segment-melies-003"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Le Voyage dans la Lune, Segment 4",
+ "img": {
+ "src": ""
+ },
+ "title": "Alunissage et sortie de l'équipage",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 348500,
+ "end": 358000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-melies",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "10485760",
+ "media": "media-melies",
+ "id": "segment-melies-004"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Lancement de la sonde Juno, Segment 1",
+ "img": {
+ "src": ""
+ },
+ "title": "Décompte du décollage de la fusée Atlas V",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 7000,
+ "end": 11000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-atlas",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "32768",
+ "media": "media-atlas",
+ "id": "segment-atlas-001"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Lancement de la sonde Juno, Segment 2",
+ "img": {
+ "src": ""
+ },
+ "title": "La fusée Atlas V décolle",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 16000,
+ "end": 19000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-atlas",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "32768",
+ "media": "media-atlas",
+ "id": "segment-atlas-002"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Lancement de la sonde Juno, Segment 3",
+ "img": {
+ "src": ""
+ },
+ "title": "La fusée Atlas V en vol",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 35000,
+ "end": 38000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-atlas",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "32768",
+ "media": "media-atlas",
+ "id": "segment-atlas-003"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Mission Apollo 11, Segment 1",
+ "img": {
+ "src": ""
+ },
+ "title": "Décollage du lanceur Saturn V",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 20000,
+ "end": 23000,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-apollo",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "16763904",
+ "media": "media-apollo",
+ "id": "segment-apollo-001"
+ }, {
+ "content": {
+ "mimetype": "application/x-ldt-structured",
+ "description": "Mission Apollo 11, Segment 2",
+ "img": {
+ "src": ""
+ },
+ "title": "'One small step for man, one giant leap for mankind'",
+ "color": "16763904",
+ "polemics": [],
+ "audio": {
+ "mimetype": "audio/mp3",
+ "src": "",
+ "href": null
+ }
+ },
+ "begin": 62500,
+ "end": 75500,
+ "meta": {
+ "dc:contributor": "perso",
+ "id-ref": "decoupage-apollo",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:modified": "2012-05-11T15:08:00.348480",
+ "dc:creator": "perso"
+ },
+ "tags": [],
+ "color": "16763904",
+ "media": "media-apollo",
+ "id": "segment-apollo-002"
+ }
+ ],
+ "annotation-types": [
+ {
+ "dc:contributor": "perso",
+ "dc:creator": "perso",
+ "dc:title": "Segments du Voyage sur la Lune",
+ "id": "decoupage-melies",
+ "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",
+ "id": "decoupage-atlas",
+ "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",
+ "id": "decoupage-apollo",
+ "dc:created": "2012-05-11T15:08:00.348480",
+ "dc:description": "",
+ "dc:modified": "2012-05-11T15:08:00.348480"
+ }
+ ]
+}
\ No newline at end of file
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/player-html.htm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metadataplayer/mashup/player-html.htm Tue Jun 26 15:53:42 2012 +0200
@@ -0,0 +1,117 @@
+
+
+
+ Preuve de concept Mashup
+
+
+
+
+
+
+
+
+
Créer un Hash-cut en 3 étapes :
+
+
+
+
S'inscrire et
créer un projet
+
+
+
+
+
Découper et
Assembler
+
+
+
+
+
Partager et
regarder !
+
+
+
+
+
Mon HashCut (ne fonctionne pas avec Firefox)
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/player-local-html.htm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metadataplayer/mashup/player-local-html.htm Tue Jun 26 15:53:42 2012 +0200
@@ -0,0 +1,104 @@
+
+
+
+ Preuve de concept Mashup
+
+
+
+
+
+
+
+
+
Créer un Hash-cut en 3 étapes :
+
+
+
+
S'inscrire et
créer un projet
+
+
+
+
+
Découper et
Assembler
+
+
+
+
+
Partager et
regarder !
+
+
+
+
+
Mon HashCut (ne fonctionne pas avec Firefox)
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/player-local.htm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/metadataplayer/mashup/player-local.htm Tue Jun 26 15:53:42 2012 +0200
@@ -0,0 +1,109 @@
+
+
+
+ Preuve de concept Mashup
+
+
+
+
+
+
+
+
+
Créer un Hash-cut en 3 étapes :
+
+
+
+
S'inscrire et
créer un projet
+
+
+
+
+
Découper et
Assembler
+
+
+
+
+
Partager et
regarder !
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/mashup/player.htm
--- a/metadataplayer/mashup/player.htm Fri Jun 15 13:04:55 2012 +0200
+++ b/metadataplayer/mashup/player.htm Tue Jun 26 15:53:42 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 = {
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/metadataplayer/AnnotationsList.js
--- a/metadataplayer/metadataplayer/AnnotationsList.js Fri Jun 15 13:04:55 2012 +0200
+++ b/metadataplayer/metadataplayer/AnnotationsList.js Tue Jun 26 15:53:42 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));
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/metadataplayer/Controller.js
--- a/metadataplayer/metadataplayer/Controller.js Fri Jun 15 13:04:55 2012 +0200
+++ b/metadataplayer/metadataplayer/Controller.js Tue Jun 26 15:53:42 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 */
@@ -196,7 +199,7 @@
};
IriSP.Widgets.Controller.prototype.muteHandler = function() {
- this.player.popcorn.mute(!this.player.popcorn.muted());
+ this.player.popcorn.muted(!this.player.popcorn.muted());
};
IriSP.Widgets.Controller.prototype.volumeUpdater = function() {
diff -r 3cc57cb48aea -r 4f1b7aa04ec7 metadataplayer/metadataplayer/LdtPlayer-core.js
--- a/metadataplayer/metadataplayer/LdtPlayer-core.js Fri Jun 15 13:04:55 2012 +0200
+++ b/metadataplayer/metadataplayer/LdtPlayer-core.js Tue Jun 26 15:53:42 2012 +0200
@@ -77,8 +77,13 @@
.script(IriSP.getLib("underscore"))
.script(IriSP.getLib("Mustache"))
.script(IriSP.getLib("jQuery"))
- .script(IriSP.getLib("swfObject"))
- .wait()
+ .script(IriSP.getLib("swfObject"));
+
+ if (typeof JSON == "undefined") {
+ $L.script(IriSP.getLib("json"));
+ }
+
+ $L.wait()
.script(IriSP.getLib("jQueryUI"));
if (this.config.player.type === "jwplayer" || this.config.player.type === "auto") {
@@ -147,8 +152,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;
@@ -197,7 +226,7 @@
IriSP.Metadataplayer.prototype.configurePopcorn = function() {
IriSP.log("IriSP.Metadataplayer.prototype.configurePopcorn");
var pop,
- ret = this.layoutDivs("video"),
+ ret = this.layoutDivs("video",this.config.player.height || undefined),
containerDiv = ret[0],
spacerDiv = ret[1],
_this = this,
@@ -307,6 +336,10 @@
pop = new IriSP.PopcornReplacement.allocine("#" + containerDiv, this.config.player);
break;
+ case "mashup-html":
+ pop = new IriSP.PopcornReplacement.htmlMashup("#" + containerDiv, this.config.player, this.videoData);
+ break;
+
default:
pop = undefined;
};
@@ -318,7 +351,7 @@
@param widgetName the name of the widget.
@return an array of the form [createdivId, spacerdivId].
*/
-IriSP.Metadataplayer.prototype.layoutDivs = function(_name) {
+IriSP.Metadataplayer.prototype.layoutDivs = function(_name, _height) {
if (typeof(_name) === "undefined") {
_name = "";
}
@@ -339,6 +372,9 @@
position: "relative",
clear: "both"
});
+ if (typeof _height !== "undefined") {
+ divHtml.css("height", _height);
+ }
this.$.append(divHtml);
this.$.append(spacerHtml);
@@ -384,60 +420,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] = [];
+ if (!this.msgPump.hasOwnProperty(msg)) {
+ this.msgPump[msg] = [];
+ }
+ this.msgPump[msg].push(callback);
+};
- 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);
@@ -449,12 +472,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];
@@ -466,7 +489,9 @@
c.onEnd();
}
}
+
};
+*/
IriSP.PopcornReplacement.player.prototype.currentTime = function(time) {
if (typeof(time) === "undefined") {
@@ -481,16 +506,13 @@
IriSP.PopcornReplacement.player.prototype.play = function() {
this.media.paused = false;
this.trigger("play");
- //IriSP.PopcornReplacement.trigger("playing");
this.playerFns.play();
};
IriSP.PopcornReplacement.player.prototype.pause = function() {
-// if ( !this.media.paused ) {
this.media.paused = true;
- this.trigger( "pause" );
+ this.trigger("pause");
this.playerFns.pause();
-// }
};
IriSP.PopcornReplacement.player.prototype.muted = function(val) {
@@ -530,81 +552,21 @@
return _vol;
};
-IriSP.PopcornReplacement.player.prototype.mute = IriSP.PopcornReplacement.player.prototype.muted;
-
-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.mute = function() {
+ this.muted(true);
+}
-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];
+IriSP.PopcornReplacement.player.prototype.unmute = function() {
+ this.muted(false);
+}
- 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();
return Math.round(currentTime);
-};/* model.js is where data is stored in a standard form, whatever the serializer */
+};/* TODO: Separate Project-specific data from Source */
+
+/* model.js is where data is stored in a standard form, whatever the serializer */
IriSP.Model = {
_SOURCE_STATUS_EMPTY : 0,
@@ -900,11 +862,11 @@
}
IriSP.Model.Time.prototype.getSeconds = function() {
- return Math.floor(this.milliseconds / 1000);
+ return this.milliseconds / 1000;
}
IriSP.Model.Time.prototype.getHMS = function() {
- var _totalSeconds = Math.abs(this.getSeconds());
+ var _totalSeconds = Math.abs(Math.floor(this.getSeconds()));
return {
hours : Math.floor(_totalSeconds / 3600),
minutes : (Math.floor(_totalSeconds / 60) % 60),
@@ -1264,18 +1226,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();
@@ -1385,6 +1335,9 @@
}
IriSP.Model.Directory.prototype.remoteSource = function(_properties) {
+ if (typeof _properties !== "object" || typeof _properties.url === "undefined") {
+ throw "Error : IriSP.Model.Directory.remoteSource(configuration): configuration.url is undefined";
+ }
var _config = IriSP._({ directory: this }).extend(_properties);
if (typeof this.remoteSources[_properties.url] === "undefined") {
this.remoteSources[_properties.url] = new IriSP.Model.RemoteSource(_config);
@@ -1428,7 +1381,8 @@
jwplayer : "jwplayer.js",
raphael : "raphael-min.js",
tracemanager : "tracemanager.js",
- jwPlayerSWF : "player.swf"
+ jwPlayerSWF : "player.swf",
+ json : "json2.js"
},
locations : {
// use to define locations outside defautl_dir
@@ -1665,13 +1619,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");
}
@@ -1693,27 +1645,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;
- */
}
};/* To wrap a player the develop should create a new class derived from
@@ -1827,31 +1770,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;
}
@@ -1865,12 +1803,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() },
@@ -1879,12 +1818,209 @@
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);
};
IriSP.PopcornReplacement.jwplayer.prototype = new IriSP.PopcornReplacement.player("", {});
+/* To wrap a player the develop should create a new class derived from
+ the IriSP.PopcornReplacement.player and defining the correct functions */
+
+/** jwplayer player wrapper */
+IriSP.PopcornReplacement.htmlMashup = function(container, options, metadata) {
+ /* appel du parent pour initialiser les structures communes à tous les players */
+ IriSP.PopcornReplacement.player.call(this, container, options);
+
+ this.mashup = metadata.currentMedia;
+ this.$ = IriSP.jQuery(container);
+
+ var _w = this.$.width(),
+ _h = this.$.height(),
+ _this = this;
+
+ IriSP._(metadata.currentMedia.medias).each(function(_media) {
+ var _tmpId = Popcorn.guid("video"),
+ _videoEl = IriSP.jQuery('