crea/integration/generator.html
changeset 15 f1d070549d94
parent 2 44deeff592e2
child 30 8cda6414d63e
--- a/crea/integration/generator.html	Wed Jun 06 18:35:36 2012 +0200
+++ b/crea/integration/generator.html	Wed Jun 06 19:36:25 2012 +0200
@@ -25,6 +25,13 @@
         _annotationTypeList = new IriSP.Model.List(_directory),
         _colors = ['red','yellow','green','blue'],
         _emoticons = ['happy','unhappy','laughing','surprised'],
+        _audioUrls = [
+            "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191121613",
+            "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191109062",
+            "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191048270",
+            "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606191026101",
+            "rtmp://media.iri.centrepompidou.fr/ddc_micro_record/r_20120606190910299"
+        ],
         _alltags = _colors.concat(_emoticons),
         _duration = 147000;
     
@@ -60,6 +67,13 @@
         _annotation.created = new Date();
         _annotation.creator = "Math.random()";
         _annotation.description = _color + " " + _emoticon;
+        if (Math.random() < .33) {
+            _annotation.audio = {
+                src: "mic",
+                mimetype: "audio/mp3",
+                href: _audioUrls[Math.floor(5*Math.random())]
+            }
+        }
         _annotationList.push(_annotation);
     }