integration/js/mashupplayer.js
changeset 41 3ec2343f2b85
child 43 5a5024bc74e6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/integration/js/mashupplayer.js	Thu Nov 08 18:24:47 2012 +0100
@@ -0,0 +1,21 @@
+IriSP.player = function(options) {
+    
+    var directory = new IriSP.Model.Directory(),
+        project = directory.remoteSource({
+            url: options.url,
+            serializer: IriSP.serializers.ldt
+        }),
+        mashup;
+    
+    project.onLoad(function() {
+        mashup = project.getMashups()[0];
+        IriSP.mashupcore(project, mashup);
+        project.trigger("set-current",mashup);
+        
+        $(".info-title a").text(mashup.title);
+        $(".info-duration td").text(mashup.duration.toString());
+        $(".info-author a").text(mashup.creator);
+        $(".info-description td").text(mashup.description);
+        
+    });
+}