From 60fa4589a35f83cc6bacafb861d1be8103dae3fa Mon Sep 17 00:00:00 2001
From: krome
Date: Tue, 28 Sep 2010 16:17:10 +0200
Subject: [PATCH] Lastfm support added
---
demos/semantic_video/index.html | 9 +++-
demos/semantic_video/xml/webMadeMovies.xml | 4 ++
popcorn.js | 49 ++++++++++++++++++++++
3 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/demos/semantic_video/index.html b/demos/semantic_video/index.html
index 8b9e05c..cdcb07a 100644
--- a/demos/semantic_video/index.html
+++ b/demos/semantic_video/index.html
@@ -85,7 +85,7 @@
@@ -118,7 +118,7 @@
};
Popcorn.VideoManager.prototype.loaded = function() {
for (var i in this.commandObjects) {
- if (this.commandObjects[i].name === 'flickr' || this.commandObjects[i].name === 'footnote' || this.commandObjects[i].name === 'location' || this.commandObjects[i].name === 'twitter' || this.commandObjects[i].name === 'wiki') {
+ if (this.commandObjects[i].name === 'flickr' || this.commandObjects[i].name === 'footnote' || this.commandObjects[i].name === 'location' || this.commandObjects[i].name === 'twitter' || this.commandObjects[i].name === 'wiki' || this.commandObjects[i].name === 'lastfm') {
this.commandObjects[i].extension.image = createImage("images/overlay/" + this.commandObjects[i].name + ".png");
this.commandObjects[i].extension.onIn = function() {
this.image.setAttribute('style', "display:inline");
@@ -226,6 +226,11 @@
+
+
diff --git a/demos/semantic_video/xml/webMadeMovies.xml b/demos/semantic_video/xml/webMadeMovies.xml
index 3ff05ac..0662c60 100644
--- a/demos/semantic_video/xml/webMadeMovies.xml
+++ b/demos/semantic_video/xml/webMadeMovies.xml
@@ -179,6 +179,10 @@
Celine Celines
+
+
+
+
';
+ htmlString += '
Similar
';
+ jQuery.each(data.artist.similar.artist, function(i,val) {
+ htmlString += '- '+ this.name +'
';
+ });
+ htmlString += '
';
+ target.innerHTML = htmlString;
+ }
+ );
+
+ this.target = target;
+ this.onIn = function() {
+ this.target.setAttribute('style', 'display:inline');
+ };
+ this.onOut = function() {
+ this.target.setAttribute('style', 'display:none');
+ };
+ this.preload = function() {}; // Probably going to need to preload this.
+ };
+
////////////////////////////////////////////////////////////////////////////
// Twitter Command
////////////////////////////////////////////////////////////////////////////
@@ -937,6 +981,11 @@
create: function(name, params, text, videoManager) {
return new Popcorn.WikiCommand(name, params, text, videoManager);
}
+ },
+ lastfm: {
+ create: function(name, params, text, videoManager) {
+ return new Popcorn.LastfmCommand(name, params, text, videoManager);
+ }
},
lowerthird: {
create: function(name, params, text, videoManager) {
--
2.43.0