# HG changeset patch # User ymh # Date 1339116653 -7200 # Node ID ed5bc0bed38fda6ea44f5b7f970ea6f888a921ba # Parent 04aff04377a32fd1a1595748cd8a41ab3d1013a6# Parent cd7c289e56257125ae3ec3782532f28d7c02537e Merge with cd7c289e56257125ae3ec3782532f28d7c02537e diff -r 04aff04377a3 -r ed5bc0bed38f crea/integration/data/au-clair-de-la-lune.json --- a/crea/integration/data/au-clair-de-la-lune.json Fri Jun 08 02:49:52 2012 +0200 +++ b/crea/integration/data/au-clair-de-la-lune.json Fri Jun 08 02:50:53 2012 +0200 @@ -63,236 +63,141 @@ "annotations": [ { "id": "annotation-0", - "begin": 135332, - "end": 135332, + "begin": 42051, + "end": 42051, "content": { "title": "", - "description": "blue surprised" + "description": "yellow surprised" }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "surprised" - } - ] - }, { - "id": "annotation-1", - "begin": 30590, - "end": 30590, - "content": { - "title": "", - "description": "yellow unhappy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { "id-ref": "yellow" }, { - "id-ref": "unhappy" + "id-ref": "surprised" } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191048270" - } + ] }, { - "id": "annotation-2", - "begin": 41823, - "end": 41823, + "id": "annotation-1", + "begin": 143958, + "end": 143958, "content": { "title": "", - "description": "red happy" + "description": "blue happy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "blue" + }, { + "id-ref": "happy" + } + ] + }, { + "id": "annotation-2", + "begin": 40256, + "end": 40256, + "content": { + "title": "", + "description": "green laughing" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "green" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-3", + "begin": 90753, + "end": 90753, + "content": { + "title": "", + "description": "red laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191109062" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { "id-ref": "red" }, { - "id-ref": "happy" + "id-ref": "laughing" } ] }, { - "id": "annotation-3", - "begin": 22421, - "end": 22421, + "id": "annotation-4", + "begin": 8161, + "end": 8161, "content": { "title": "", - "description": "blue surprised" + "description": "red unhappy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { - "id-ref": "blue" - }, { - "id-ref": "surprised" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" - } - }, { - "id": "annotation-4", - "begin": 61797, - "end": 61797, - "content": { - "title": "", - "description": "yellow unhappy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "yellow" + "id-ref": "red" }, { "id-ref": "unhappy" } ] }, { "id": "annotation-5", - "begin": 121288, - "end": 121288, + "begin": 53442, + "end": 53442, "content": { "title": "", - "description": "yellow happy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "yellow" - }, { - "id-ref": "happy" + "description": "red happy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191109062" } - ] - }, { - "id": "annotation-6", - "begin": 109477, - "end": 109477, - "content": { - "title": "", - "description": "red happy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "red" - }, { - "id-ref": "happy" - } - ] - }, { - "id": "annotation-7", - "begin": 118960, - "end": 118960, - "content": { - "title": "", - "description": "blue surprised" }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "surprised" - } - ] - }, { - "id": "annotation-8", - "begin": 139718, - "end": 139718, - "content": { - "title": "", - "description": "green surprised" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "green" - }, { - "id-ref": "surprised" - } - ] - }, { - "id": "annotation-9", - "begin": 50509, - "end": 50509, - "content": { - "title": "", - "description": "blue unhappy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "unhappy" - } - ] - }, { - "id": "annotation-10", - "begin": 127102, - "end": 127102, - "content": { - "title": "", - "description": "red happy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -303,17 +208,90 @@ } ] }, { - "id": "annotation-11", - "begin": 35069, - "end": 35069, + "id": "annotation-6", + "begin": 85348, + "end": 85348, "content": { "title": "", - "description": "red laughing" + "description": "blue happy" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "blue" + }, { + "id-ref": "happy" + } + ] + }, { + "id": "annotation-7", + "begin": 123487, + "end": 123487, + "content": { + "title": "", + "description": "yellow laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "yellow" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-8", + "begin": 106131, + "end": 106131, + "content": { + "title": "", + "description": "blue unhappy" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "blue" + }, { + "id-ref": "unhappy" + } + ] + }, { + "id": "annotation-9", + "begin": 27476, + "end": 27476, + "content": { + "title": "", + "description": "red laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -324,38 +302,121 @@ } ] }, { - "id": "annotation-12", - "begin": 12624, - "end": 12624, + "id": "annotation-10", + "begin": 130702, + "end": 130702, "content": { "title": "", - "description": "blue unhappy" + "description": "yellow unhappy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { - "id-ref": "blue" + "id-ref": "yellow" }, { "id-ref": "unhappy" } ] }, { - "id": "annotation-13", - "begin": 130554, - "end": 130554, + "id": "annotation-11", + "begin": 123645, + "end": 123645, "content": { "title": "", - "description": "red surprised" + "description": "yellow laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "yellow" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-12", + "begin": 106612, + "end": 106612, + "content": { + "title": "", + "description": "yellow laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "yellow" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-13", + "begin": 91495, + "end": 91495, + "content": { + "title": "", + "description": "green unhappy" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "green" + }, { + "id-ref": "unhappy" + } + ] + }, { + "id": "annotation-14", + "begin": 131185, + "end": 131185, + "content": { + "title": "", + "description": "red surprised", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -366,82 +427,9 @@ } ] }, { - "id": "annotation-14", - "begin": 71731, - "end": 71731, - "content": { - "title": "", - "description": "blue laughing" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "laughing" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" - } - }, { "id": "annotation-15", - "begin": 23071, - "end": 23071, - "content": { - "title": "", - "description": "red laughing" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "red" - }, { - "id-ref": "laughing" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" - } - }, { - "id": "annotation-16", - "begin": 78071, - "end": 78071, - "content": { - "title": "", - "description": "green unhappy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "green" - }, { - "id-ref": "unhappy" - } - ] - }, { - "id": "annotation-17", - "begin": 42334, - "end": 42334, + "begin": 87193, + "end": 87193, "content": { "title": "", "description": "green happy" @@ -449,7 +437,7 @@ "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -460,35 +448,56 @@ } ] }, { - "id": "annotation-18", - "begin": 113880, - "end": 113880, + "id": "annotation-16", + "begin": 69442, + "end": 69442, "content": { "title": "", - "description": "yellow laughing" + "description": "red happy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { - "id-ref": "yellow" + "id-ref": "red" }, { - "id-ref": "laughing" + "id-ref": "happy" } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" - } + ] }, { - "id": "annotation-19", - "begin": 95641, - "end": 95641, + "id": "annotation-17", + "begin": 27449, + "end": 27449, + "content": { + "title": "", + "description": "green surprised" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "green" + }, { + "id-ref": "surprised" + } + ] + }, { + "id": "annotation-18", + "begin": 94180, + "end": 94180, "content": { "title": "", "description": "yellow unhappy" @@ -496,7 +505,7 @@ "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -507,38 +516,22 @@ } ] }, { - "id": "annotation-20", - "begin": 142757, - "end": 142757, + "id": "annotation-19", + "begin": 78694, + "end": 78694, "content": { "title": "", - "description": "blue laughing" + "description": "green happy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "laughing" - } - ] - }, { - "id": "annotation-21", - "begin": 146013, - "end": 146013, - "content": { - "title": "", - "description": "green happy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -549,9 +542,35 @@ } ] }, { - "id": "annotation-22", - "begin": 30647, - "end": 30647, + "id": "annotation-20", + "begin": 99745, + "end": 99745, + "content": { + "title": "", + "description": "red surprised", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "red" + }, { + "id-ref": "surprised" + } + ] + }, { + "id": "annotation-21", + "begin": 12418, + "end": 12418, "content": { "title": "", "description": "yellow unhappy" @@ -559,7 +578,28 @@ "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "yellow" + }, { + "id-ref": "unhappy" + } + ] + }, { + "id": "annotation-22", + "begin": 111247, + "end": 111247, + "content": { + "title": "", + "description": "yellow unhappy" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -571,157 +611,21 @@ ] }, { "id": "annotation-23", - "begin": 113046, - "end": 113046, + "begin": 104148, + "end": 104148, "content": { "title": "", - "description": "blue laughing" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "laughing" + "description": "green unhappy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191048270" } - ] - }, { - "id": "annotation-24", - "begin": 22487, - "end": 22487, - "content": { - "title": "", - "description": "red happy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "red" - }, { - "id-ref": "happy" - } - ] - }, { - "id": "annotation-25", - "begin": 73757, - "end": 73757, - "content": { - "title": "", - "description": "green happy" }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "green" - }, { - "id-ref": "happy" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" - } - }, { - "id": "annotation-26", - "begin": 107130, - "end": 107130, - "content": { - "title": "", - "description": "yellow happy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "yellow" - }, { - "id-ref": "happy" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" - } - }, { - "id": "annotation-27", - "begin": 139121, - "end": 139121, - "content": { - "title": "", - "description": "blue unhappy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "unhappy" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" - } - }, { - "id": "annotation-28", - "begin": 98209, - "end": 98209, - "content": { - "title": "", - "description": "blue unhappy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "unhappy" - } - ] - }, { - "id": "annotation-29", - "begin": 119558, - "end": 119558, - "content": { - "title": "", - "description": "green unhappy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -732,124 +636,228 @@ } ] }, { - "id": "annotation-30", - "begin": 118248, - "end": 118248, + "id": "annotation-24", + "begin": 99817, + "end": 99817, "content": { "title": "", - "description": "green surprised" + "description": "yellow laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { - "id-ref": "green" + "id-ref": "yellow" }, { - "id-ref": "surprised" + "id-ref": "laughing" } ] }, { - "id": "annotation-31", - "begin": 127177, - "end": 127177, + "id": "annotation-25", + "begin": 17422, + "end": 17422, "content": { "title": "", - "description": "red surprised" + "description": "blue happy" }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "blue" + }, { + "id-ref": "happy" + } + ] + }, { + "id": "annotation-26", + "begin": 44344, + "end": 44344, + "content": { + "title": "", + "description": "red laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { "id-ref": "red" }, { - "id-ref": "surprised" + "id-ref": "laughing" } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191109062" - } + ] }, { - "id": "annotation-32", - "begin": 49000, - "end": 49000, + "id": "annotation-27", + "begin": 3381, + "end": 3381, "content": { "title": "", - "description": "green laughing" + "description": "yellow unhappy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191048270" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { - "id-ref": "green" + "id-ref": "yellow" }, { - "id-ref": "laughing" + "id-ref": "unhappy" } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" - } + ] }, { - "id": "annotation-33", - "begin": 30317, - "end": 30317, + "id": "annotation-28", + "begin": 92027, + "end": 92027, "content": { "title": "", - "description": "blue laughing" + "description": "red laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { - "id-ref": "blue" + "id-ref": "red" }, { "id-ref": "laughing" } ] }, { - "id": "annotation-34", - "begin": 129677, - "end": 129677, + "id": "annotation-29", + "begin": 53250, + "end": 53250, "content": { "title": "", - "description": "green happy" + "description": "red laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191048270" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "red" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-30", + "begin": 75784, + "end": 75784, + "content": { + "title": "", + "description": "yellow laughing" }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "yellow" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-31", + "begin": 94287, + "end": 94287, + "content": { + "title": "", + "description": "yellow laughing" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { - "id-ref": "green" + "id-ref": "yellow" }, { - "id-ref": "happy" + "id-ref": "laughing" } ] }, { - "id": "annotation-35", - "begin": 73832, - "end": 73832, + "id": "annotation-32", + "begin": 103466, + "end": 103466, + "content": { + "title": "", + "description": "red laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "red" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-33", + "begin": 37706, + "end": 37706, "content": { "title": "", "description": "blue surprised" @@ -857,7 +865,7 @@ "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -868,17 +876,64 @@ } ] }, { - "id": "annotation-36", - "begin": 97352, - "end": 97352, + "id": "annotation-34", + "begin": 145058, + "end": 145058, "content": { "title": "", - "description": "blue surprised" + "description": "green laughing" }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "green" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-35", + "begin": 77938, + "end": 77938, + "content": { + "title": "", + "description": "yellow unhappy" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "yellow" + }, { + "id-ref": "unhappy" + } + ] + }, { + "id": "annotation-36", + "begin": 62117, + "end": 62117, + "content": { + "title": "", + "description": "blue surprised", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -890,128 +945,8 @@ ] }, { "id": "annotation-37", - "begin": 40777, - "end": 40777, - "content": { - "title": "", - "description": "yellow unhappy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "yellow" - }, { - "id-ref": "unhappy" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" - } - }, { - "id": "annotation-38", - "begin": 24691, - "end": 24691, - "content": { - "title": "", - "description": "blue happy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "blue" - }, { - "id-ref": "happy" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191109062" - } - }, { - "id": "annotation-39", - "begin": 135481, - "end": 135481, - "content": { - "title": "", - "description": "red laughing" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "red" - }, { - "id-ref": "laughing" - } - ] - }, { - "id": "annotation-40", - "begin": 119682, - "end": 119682, - "content": { - "title": "", - "description": "yellow surprised" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "yellow" - }, { - "id-ref": "surprised" - } - ] - }, { - "id": "annotation-41", - "begin": 33967, - "end": 33967, - "content": { - "title": "", - "description": "red surprised" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "red" - }, { - "id-ref": "surprised" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" - } - }, { - "id": "annotation-42", - "begin": 45133, - "end": 45133, + "begin": 111906, + "end": 111906, "content": { "title": "", "description": "blue surprised" @@ -1019,7 +954,7 @@ "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -1028,105 +963,32 @@ }, { "id-ref": "surprised" } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" - } + ] }, { - "id": "annotation-43", - "begin": 59779, - "end": 59779, + "id": "annotation-38", + "begin": 109534, + "end": 109534, "content": { "title": "", - "description": "red surprised" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "red" - }, { - "id-ref": "surprised" - } - ] - }, { - "id": "annotation-44", - "begin": 81347, - "end": 81347, - "content": { - "title": "", - "description": "red happy" + "description": "yellow laughing" }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "red" - }, { - "id-ref": "happy" - } - ] - }, { - "id": "annotation-45", - "begin": 36877, - "end": 36877, - "content": { - "title": "", - "description": "red happy" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", - "dc:creator": "Math.random()" - }, - "tags": [ - { - "id-ref": "red" - }, { - "id-ref": "happy" - } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191048270" - } - }, { - "id": "annotation-46", - "begin": 133810, - "end": 133810, - "content": { - "title": "", - "description": "yellow surprised" - }, - "media": "au-clair-de-la-lune", - "meta": { - "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { "id-ref": "yellow" }, { - "id-ref": "surprised" + "id-ref": "laughing" } ] }, { - "id": "annotation-47", - "begin": 80937, - "end": 80937, + "id": "annotation-39", + "begin": 84017, + "end": 84017, "content": { "title": "", "description": "red unhappy" @@ -1134,7 +996,101 @@ "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "red" + }, { + "id-ref": "unhappy" + } + ] + }, { + "id": "annotation-40", + "begin": 21050, + "end": 21050, + "content": { + "title": "", + "description": "yellow laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "yellow" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-41", + "begin": 124389, + "end": 124389, + "content": { + "title": "", + "description": "blue happy" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "blue" + }, { + "id-ref": "happy" + } + ] + }, { + "id": "annotation-42", + "begin": 83251, + "end": 83251, + "content": { + "title": "", + "description": "green unhappy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191109062" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "green" + }, { + "id-ref": "unhappy" + } + ] + }, { + "id": "annotation-43", + "begin": 35801, + "end": 35801, + "content": { + "title": "", + "description": "red unhappy" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ @@ -1143,64 +1099,153 @@ }, { "id-ref": "unhappy" } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191109062" - } + ] }, { - "id": "annotation-48", - "begin": 73482, - "end": 73482, + "id": "annotation-44", + "begin": 10573, + "end": 10573, "content": { "title": "", - "description": "yellow unhappy" + "description": "green unhappy", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "green" + }, { + "id-ref": "unhappy" + } + ] + }, { + "id": "annotation-45", + "begin": 100004, + "end": 100004, + "content": { + "title": "", + "description": "blue laughing", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101" + } }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "blue" + }, { + "id-ref": "laughing" + } + ] + }, { + "id": "annotation-46", + "begin": 103773, + "end": 103773, + "content": { + "title": "", + "description": "blue surprised", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "blue" + }, { + "id-ref": "surprised" + } + ] + }, { + "id": "annotation-47", + "begin": 122896, + "end": 122896, + "content": { + "title": "", + "description": "green surprised", + "audio": { + "src": "mic", + "mimetype": "audio/mp3", + "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" + } + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", + "dc:creator": "Math.random()" + }, + "tags": [ + { + "id-ref": "green" + }, { + "id-ref": "surprised" + } + ] + }, { + "id": "annotation-48", + "begin": 111608, + "end": 111608, + "content": { + "title": "", + "description": "yellow laughing" + }, + "media": "au-clair-de-la-lune", + "meta": { + "id-ref": "musitag", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { "id-ref": "yellow" }, { - "id-ref": "unhappy" + "id-ref": "laughing" } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191048270" - } + ] }, { "id": "annotation-49", - "begin": 2453, - "end": 2453, + "begin": 2753, + "end": 2753, "content": { "title": "", - "description": "yellow happy" + "description": "green unhappy" }, "media": "au-clair-de-la-lune", "meta": { "id-ref": "musitag", - "dc:created": "2012-06-06T17:28:54Z", + "dc:created": "2012-06-07T16:12:58Z", "dc:creator": "Math.random()" }, "tags": [ { - "id-ref": "yellow" + "id-ref": "green" }, { - "id-ref": "happy" + "id-ref": "unhappy" } - ], - "audio": { - "src": "mic", - "mimetype": "audio/mp3", - "href": "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613" - } + ] } ] } \ No newline at end of file diff -r 04aff04377a3 -r ed5bc0bed38f crea/integration/generator.html --- a/crea/integration/generator.html Fri Jun 08 02:49:52 2012 +0200 +++ b/crea/integration/generator.html Fri Jun 08 02:50:53 2012 +0200 @@ -67,7 +67,7 @@ _annotation.created = new Date(); _annotation.creator = "Math.random()"; _annotation.description = _color + " " + _emoticon; - if (Math.random() < .33) { + if (Math.random() < .5) { _annotation.audio = { src: "mic", mimetype: "audio/mp3", diff -r 04aff04377a3 -r ed5bc0bed38f crea/integration/metadataplayer/LdtPlayer-core.js --- a/crea/integration/metadataplayer/LdtPlayer-core.js Fri Jun 08 02:49:52 2012 +0200 +++ b/crea/integration/metadataplayer/LdtPlayer-core.js Fri Jun 08 02:50:53 2012 +0200 @@ -1902,26 +1902,28 @@ /** jwplayer player wrapper */ IriSP.PopcornReplacement.jwplayer = function(container, options) { - /* appel du parent pour initialiser les structures communes à tous les players */ - IriSP.PopcornReplacement.player.call(this, container, options); + /* appel du parent pour initialiser les structures communes à tous les players */ + IriSP.PopcornReplacement.player.call(this, container, options); - this.media.duration = options.duration; /* optional */ + this.media.duration = options.duration; /* optional */ + + var _player = jwplayer(this.container); /* Définition des fonctions de l'API - */ - this.playerFns = { - play: function() { return jwplayer(this.container).play(); }, - pause: function() { return jwplayer(this.container).pause(); }, - getPosition: function() { return jwplayer(this.container).getPosition(); }, - seek: function(pos) { return jwplayer(this.container).seek(pos); }, - getMute: function() { return jwplayer(this.container).getMute() }, - setMute: function(p) { return jwplayer(this.container).setMute(p); }, - getVolume: function() { return jwplayer(this.container).getVolume() / 100; }, - setVolume: function(p) { return jwplayer(this.container).setVolume(Math.floor(100*p)); } - } + this.playerFns = { + play: function() { return _player.play(); }, + pause: function() { return _player.pause(); }, + getPosition: function() { return _player.getPosition(); }, + seek: function(pos) { return _player.seek(pos); }, + getMute: function() { return _player.getMute() }, + setMute: function(p) { return _player.setMute(p); }, + getVolume: function() { return _player.getVolume() / 100; }, + setVolume: function(p) { return _player.setVolume(Math.floor(100*p)); } + } - options.events = this.callbacks; + options.events = this.callbacks; - jwplayer(this.container).setup(options); + _player.setup(options); }; IriSP.PopcornReplacement.jwplayer.prototype = new IriSP.PopcornReplacement.player("", {}); @@ -2167,8 +2169,8 @@ if (typeof _data.meta["dc:source"] !== "undefined" && typeof _data.meta["dc:source"].content !== "undefined") { _res.source = JSON.parse(_data.meta["dc:source"].content); } - if (typeof _data.audio !== "undefined" && _data.audio.href) { - _res.audio = _data.audio; + if (typeof _data.content.audio !== "undefined" && _data.content.audio.href) { + _res.audio = _data.content.audio; } return _res; }, @@ -2179,7 +2181,8 @@ end : _data.end.milliseconds, content : { title : _data.title, - description : _data.description + description : _data.description, + audio : _data.audio }, media : _source.unNamespace(_data.media.id), meta : { @@ -2192,8 +2195,7 @@ return { "id-ref" : _source.unNamespace(_id) } - }), - audio : _data.audio + }) } } }, diff -r 04aff04377a3 -r ed5bc0bed38f crea/integration/metadataplayer/MusitagAnnotations.css --- a/crea/integration/metadataplayer/MusitagAnnotations.css Fri Jun 08 02:49:52 2012 +0200 +++ b/crea/integration/metadataplayer/MusitagAnnotations.css Fri Jun 08 02:50:53 2012 +0200 @@ -17,6 +17,14 @@ background-position: 0 -45px; } +.Musitag-Annotations-Balloon.pause { + background-position: -66px 0; +} + +.Musitag-Annotations-Balloon.pause:hover { + background-position: -66px -45px; +} + .Musitag-Annotations-tag:first-child .Musitag-container-50 { z-index: 20; } @@ -79,4 +87,8 @@ .Musitag-Annotations-tag:first-child:nth-last-child(10) ~ .Musitag-Annotations-tag { margin: -29px 0 0; -} \ No newline at end of file +} + +.Musitag-Annotations-Audioplayer { + position: absolute; width: 1px; height: 1px; +} diff -r 04aff04377a3 -r ed5bc0bed38f crea/integration/metadataplayer/MusitagAnnotations.js --- a/crea/integration/metadataplayer/MusitagAnnotations.js Fri Jun 08 02:49:52 2012 +0200 +++ b/crea/integration/metadataplayer/MusitagAnnotations.js Fri Jun 08 02:50:53 2012 +0200 @@ -4,15 +4,65 @@ IriSP.Widgets.MusitagAnnotations.prototype = new IriSP.Widgets.Widget(); +IriSP.Widgets.MusitagAnnotations.prototype.template = + '
'; + +IriSP.Widgets.MusitagAnnotations.prototype.annotation_template = + '
' + + '
' + + '
' + + '
' + + '
' + + '
{{#audio}}
{{/audio}}' + + '
'; + IriSP.Widgets.MusitagAnnotations.prototype.defaults = { annotation_type: 'musitag', columns: 15, max_by_column: 10, emoticons: ['happy', 'unhappy', 'laughing', 'surprised'], - colors: ['red', 'yellow', 'green', 'blue'] + colors: ['red', 'yellow', 'green', 'blue'], + rtmp_streamer: "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/" }; IriSP.Widgets.MusitagAnnotations.prototype.draw = function() { + this.renderTemplate(); + this.$main = this.$.find(".Musitag-Annotations-Main"); + var _this = this; + this.jwplayer = jwplayer("Musitag-Annotations-Audioplayer"); + this.jwplayer.setup({ + flashplayer: IriSP.getLib("jwPlayerSWF"), + width: 1, + height: 1, + provider: "rtmp", + events: { + onPlay: function() { + _this.setPlayState(true); + }, + onPause: function() { + _this.setPlayState(false); + }, + onIdle: function() { + _this.setPlayState(false); + } + } + }); + this.current_audio = false; + this.playing = false; + this.redraw(); +} + +IriSP.Widgets.MusitagAnnotations.prototype.setPlayState = function(_playState) { + this.playing = _playState; + if (_playState) { + this.$main.find(".Musitag-Annotations-Balloon").addClass("pause"); + } else { + this.$main.find(".Musitag-Annotations-Balloon").removeClass("pause"); + } +} + +IriSP.Widgets.MusitagAnnotations.prototype.redraw = function() { + var _html = '', _annotations = this.getWidgetAnnotations(), _duration = this.source.getDuration().milliseconds, @@ -47,25 +97,40 @@ } _html += '
'; _html += _column.map(function(_annotation) { - return '
' - + '
' - + '
' - + '
' - + '
' - + '
' - + ( typeof _annotation.audio !== "undefined" && _annotation.audio.href ? '
' : '' ) - + '
'; + return Mustache.to_html(_this.annotation_template, _annotation); }).join(''); _html += '
'; } - this.$.html(_html); - this.$.find('.Musitag-Annotations-tag .Musitag-container-50').click(function() { + this.$main.html(_html); + this.$main.find('.Musitag-Annotations-tag .Musitag-container-50').click(function() { var _el = IriSP.jQuery(this).parent(); _this.player.popcorn.currentTime(_el.attr("begin-time") / 1000); }); - this.$.find('.Musitag-Annotations-tag').mouseover(function() { + this.$main.find('.Musitag-Annotations-tag').mouseover(function() { var _el = IriSP.jQuery(this); _this.$.find('.Musitag-Annotations-Balloon').hide(); _el.find('.Musitag-Annotations-Balloon').show(); }); -} \ No newline at end of file + this.$main.find('.Musitag-Annotations-Balloon').click(function() { + var _el = IriSP.jQuery(this), + _audiofile = _el.attr("audio-url").replace(_this.rtmp_streamer,""); + if (_this.playing) { + _this.jwplayer.pause(); + _this.loadAudio(_audiofile); + } else { + _this.loadAudio(_audiofile); + _this.jwplayer.play(); + _this.setPlayState(true); + } + }); +} + +IriSP.Widgets.MusitagAnnotations.prototype.loadAudio = function(_audiofile) { + if (this.current_audio !== _audiofile) { + this.jwplayer.load({ + file: _audiofile, + streamer: this.rtmp_streamer + }); + this.current_audio = _audiofile; + } +}