Browse Source

Finished rework of slides and preload logistics

One bug left in Firefox to do with iframe's html having a height of 0.
Still need to test on IE. After that, this will merge with the master
branch.
pull/75/head
Zach Wise 13 years ago
parent
commit
3a08043527
  1. 8
      locale/de.js
  2. 8
      locale/en.js
  3. 8
      locale/es.js
  4. 8
      locale/fr.js
  5. 8
      locale/is.js
  6. 8
      locale/it.js
  7. 8
      locale/kr.js
  8. 8
      locale/nl.js
  9. 8
      locale/pt-br.js
  10. 8
      locale/zh-ch.js
  11. 8
      locale/zh-tw.js
  12. 65
      source/js/VMM.ExternalAPI.js
  13. 19
      source/js/VMM.MediaElement.js
  14. 4
      source/js/VMM.Slider.js
  15. 4
      source/js/VMM.Timeline.js
  16. 18
      source/js/VMM.js
  17. 11
      source/less/VMM.Slider.less
  18. 3
      themes/dark.css
  19. 8
      timeline-min.js
  20. 3
      timeline.css
  21. 110
      timeline.js

8
locale/de.js

File diff suppressed because one or more lines are too long

8
locale/en.js

File diff suppressed because one or more lines are too long

8
locale/es.js

File diff suppressed because one or more lines are too long

8
locale/fr.js

File diff suppressed because one or more lines are too long

8
locale/is.js

File diff suppressed because one or more lines are too long

8
locale/it.js

File diff suppressed because one or more lines are too long

8
locale/kr.js

File diff suppressed because one or more lines are too long

8
locale/nl.js

File diff suppressed because one or more lines are too long

8
locale/pt-br.js

File diff suppressed because one or more lines are too long

8
locale/zh-ch.js

File diff suppressed because one or more lines are too long

8
locale/zh-tw.js

File diff suppressed because one or more lines are too long

65
source/js/VMM.ExternalAPI.js

@ -5,12 +5,21 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
VMM.ExternalAPI = {
pushQues: function() {
if (VMM.master_config.googlemaps.active) {
VMM.ExternalAPI.googlemaps.pushQue();
}
if (VMM.master_config.youtube.active) {
VMM.ExternalAPI.youtube.pushQue();
}
if (VMM.master_config.soundcloud.active) {
VMM.ExternalAPI.soundcloud.pushQue();
}
if (VMM.master_config.googledocs.active) {
VMM.ExternalAPI.googledocs.pushQue();
}
},
twitter: {
@ -196,7 +205,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
http://maps.google.com/maps?q=Bavaria&hl=en&ll=47.597829,9.398804&spn=1.010316,2.709503&sll=37.0625,-95.677068&sspn=73.579623,173.408203&hnear=Bavaria,+Germany&t=m&z=10&output=embed
http://maps.google.com/maps?q=Zernikedreef+11,+Leiden,+Nederland&hl=en&sll=37.0625,-95.677068&sspn=45.957536,93.076172&oq=zernike&hnear=Zernikedreef+11,+Leiden,+Zuid-Holland,+The+Netherlands&t=m&z=16
*/
getMap: function(url, id) {
get: function(url, id) {
var timer;
var map_vars = VMM.Util.getUrlVars(url);
trace(map_vars);
@ -462,10 +471,38 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
},
googledocs: {
get: function(url, id) {
var doc = {url: url, id: id};
VMM.master_config.googledocs.que.push(doc);
VMM.master_config.googledocs.active = true;
},
creatDoc: function(doc) {
var mediaElem = "";
if (doc.url.match(/docs.google.com/i)) {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + doc.url + "&embedded=true'></iframe>";
} else {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url=" + doc.url + "&embedded=true'></iframe>";
}
VMM.attachElement("#"+doc.id, mediaElem);
},
pushQue: function() {
for(var i = 0; i < VMM.master_config.googledocs.que.length; i++) {
VMM.ExternalAPI.googledocs.creatDoc(VMM.master_config.googledocs.que[i]);
}
VMM.master_config.googledocs.que = [];
}
},
//VMM.ExternalAPI.flickr.getPhoto(mediaID, htmlID);
flickr: {
getPhoto: function(mid, id) {
get: function(mid, id) {
// http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=6d6f59d8d30d79f4f402a7644d5073e3&photo_id=6115056146&format=json&nojsoncallback=1
var the_url = "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=" + Aes.Ctr.decrypt(VMM.master_config.keys.flickr, VMM.master_config.vp, 256) + "&photo_id=" + mid + "&format=json&jsoncallback=?";
VMM.getJSON(the_url, VMM.ExternalAPI.flickr.setPhoto);
@ -502,19 +539,33 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
/*
REFORMAT TO USE API FOR CUSTOM PLAYERS
*/
getSound: function(url, id) {
// http://soundcloud.com/oembed?iframe=true&url=http://soundcloud.com/erasedtapes/olafur-arnalds-poland
var the_url = "http://soundcloud.com/oembed?url=" + url + "&format=js&callback=?";
get: function(url, id) {
var sound = {url: url, id: id};
VMM.master_config.soundcloud.que.push(sound);
VMM.master_config.soundcloud.active = true;
},
createPlayer: function(sound) {
var the_url = "http://soundcloud.com/oembed?url=" + sound.url + "&format=js&callback=?";
VMM.getJSON(the_url, function(d) {
VMM.attachElement("#"+id, d.html );
VMM.attachElement("#"+sound.id, d.html);
});
},
pushQue: function() {
for(var i = 0; i < VMM.master_config.soundcloud.que.length; i++) {
VMM.ExternalAPI.soundcloud.createPlayer(VMM.master_config.soundcloud.que[i]);
}
VMM.master_config.soundcloud.que = [];
},
},
// VMM.ExternalAPI.youtube.init(id);
youtube: {
init: function(id) {
get: function(id) {
var timer;
if (VMM.master_config.youtube.active) {
trace(id);

19
source/js/VMM.MediaElement.js

@ -87,24 +87,29 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
} else if (m.type == "flickr") {
var flickr_id = "flickr_" + m.id;
mediaElem = "<a href='" + m.link + "' target='_blank'><img id='" + flickr_id + "_large" + "'></a>";
VMM.ExternalAPI.flickr.getPhoto(m.id, "#" + flickr_id);
VMM.ExternalAPI.flickr.get(m.id, "#" + flickr_id);
// GOOGLE DOCS
} else if (m.type == "googledoc") {
var googledocs_id = "googledoc_" + VMM.Util.unique_ID(5);
/*
if (m.id.match(/docs.google.com/i)) {
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='" + m.id + "&embedded=true'></iframe>";
} else {
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url=" + m.id + "&embedded=true'></iframe>";
}
*/
mediaElem = "<div class='media-frame doc' id='" + googledocs_id + "'><span class='messege'>Loading Document</span></div>";
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id);
// YOUTUBE
} else if (m.type == "youtube") {
mediaElem = "<div class='media-frame video youtube' id='youtube_" + m.id + "'>Loading YouTube video...</div>";
VMM.ExternalAPI.youtube.init(m.id);
VMM.ExternalAPI.youtube.get(m.id);
// VIMEO
} else if (m.type == "vimeo") {
mediaElem = "<iframe class='media-frame video vimeo' autostart='false' frameborder='0' width='100%' height='100%' src='http://player.vimeo.com/video/" + m.id + "?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff'></iframe>";
// TWITTER
} else if (m.type == "twitter"){
mediaElem = "<div class='twitter' id='" + "twitter_" + m.id + "'>Loading Tweet</div>";
mediaElem = "<div class='twitter' id='" + "twitter_" + m.id + "'><span class='messege'>Loading Tweet</span></div>";
isTextMedia = true;
VMM.ExternalAPI.twitter.prettyHTML(m.id);
// TWITTER
@ -113,13 +118,13 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
// SOUNDCLOUD
} else if (m.type == "soundcloud") {
var soundcloud_id = "soundcloud_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame soundcloud' id='" + soundcloud_id + "'>Loading Sound</div>";
VMM.ExternalAPI.soundcloud.getSound(m.id, soundcloud_id);
mediaElem = "<div class='media-frame soundcloud' id='" + soundcloud_id + "'><span class='messege'>Loading Sound</span></div>";
VMM.ExternalAPI.soundcloud.get(m.id, soundcloud_id);
// GOOGLE MAPS
} else if (m.type == "google-map") {
var map_id = "googlemap_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='media-frame map' id='" + map_id + "'>Loading Map...</div>";
VMM.ExternalAPI.googlemaps.getMap(m.id, map_id);
mediaElem = "<div class='media-frame map' id='" + map_id + "'><span class='messege'>Loading Map</span></div>";
VMM.ExternalAPI.googlemaps.get(m.id, map_id);
// UNKNOWN
} else if (m.type == "unknown") {
trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");

4
source/js/VMM.Slider.js

@ -284,15 +284,11 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
}
var preloadTimeOutSlides = function() {
trace("preloadTimeOutSlides");
trace("CURRENT SLIDE: " + current_slide);
for(var j = 0; j < config.preload; j++) {
if ( !((current_slide + j) >= slides.length - 1)) {
trace("PRELOAD: " + (current_slide + j) );
slides[current_slide + j].show();
}
if ( !( (current_slide - j) < 0 ) ) {
trace("PRELOAD: " + (current_slide - j) );
slides[current_slide - j].show();
}
}

4
source/js/VMM.Timeline.js

@ -454,7 +454,9 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
var _date = {};
var td_num = 0;
var td = _dates[0].startdate;
_date.startdate = VMM.Util.date.parse(data.startDate);
_date.startdate = _dates[0].startdate;
trace(_dates[0].startdate);
trace(_date.startdate);
if (td.getMonth() === 0 && td.getDate() == 1 && td.getHours() === 0 && td.getMinutes() === 0 ) {
// trace("YEAR ONLY");

18
source/js/VMM.js

@ -113,7 +113,7 @@ if (typeof VMM == 'undefined') {
youtube: {
active: false,
array: [],
api_loaded:false,
api_loaded: false,
que: []
},
@ -122,7 +122,21 @@ if (typeof VMM == 'undefined') {
map_active: false,
places_active: false,
array: [],
api_loaded:false,
api_loaded: false,
que: []
},
googledocs: {
active: false,
array: [],
api_loaded: false,
que: []
},
soundcloud: {
active: false,
array: [],
api_loaded: false,
que: []
}

11
source/less/VMM.Slider.less

@ -187,6 +187,17 @@
line-height:0px;
padding:0px;
//max-height:400px;
span.messege {
display:block;
vertical-align:middle;
margin-left:auto;
margin-right:auto;
text-align:center;
margin-top:50%;
font-size: 28px;
font-weight: bold;
text-transform: uppercase;
}
img, iframe {
border: 1px solid @color-line;
//max-height:350px;

3
themes/dark.css

@ -68,7 +68,8 @@
.slider .nav-next .date,.slider .nav-next .title{text-align:right;padding-right:10px;}
.slider .nav-next:hover .icon{margin-right:5px;padding-right:20px;}
.slider .slider-item{position:absolute;width:700px;height:100%;padding:0px;margin:0px;overflow:hidden;display:table;}.slider .slider-item .content{display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container{display:table;vertical-align:middle;}.slider .slider-item .content .content-container .text{width:40%;max-width:50%;min-width:120px;display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container .text .container{display:table-cell;vertical-align:middle;text-align:left;padding-right:15px;}
.slider .slider-item .content .content-container .media{width:100%;min-width:50%;float:left;}.slider .slider-item .content .content-container .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .content-container .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container img,.slider .slider-item .content .content-container .media .media-wrapper .media-container iframe{border:1px solid #333333;}
.slider .slider-item .content .content-container .media{width:100%;min-width:50%;float:left;}.slider .slider-item .content .content-container .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .content-container .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container span.messege{display:block;vertical-align:middle;margin-left:auto;margin-right:auto;text-align:center;margin-top:50%;font-size:28px;font-weight:bold;text-transform:uppercase;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container img,.slider .slider-item .content .content-container .media .media-wrapper .media-container iframe{border:1px solid #333333;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map{line-height:normal;border:1px solid #333333;z-index:200;text-align:left;background-color:#1a1a1a;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map img{max-height:none !important;max-width:none !important;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .google-map{height:100%;width:100%;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution{position:absolute;z-index:201;bottom:0px;width:100%;overflow:hidden;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution .attribution-text{height:19px;overflow:hidden;-webkit-user-select:none;line-height:19px;margin-right:60px;padding-left:65px;font-family:Arial,sans-serif;font-size:10px;color:#444;white-space:nowrap;color:#1a1a1a;text-shadow:1px 1px 1px #aaaaaa;text-align:center;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution .attribution-text a{color:#1a1a1a !important;}

8
timeline-min.js vendored

File diff suppressed because one or more lines are too long

3
timeline.css

@ -68,7 +68,8 @@
.slider .nav-next .date,.slider .nav-next .title{text-align:right;padding-right:10px;}
.slider .nav-next:hover .icon{margin-right:5px;padding-right:20px;}
.slider .slider-item{position:absolute;width:700px;height:100%;padding:0px;margin:0px;overflow:hidden;display:table;}.slider .slider-item .content{display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container{display:table;vertical-align:middle;}.slider .slider-item .content .content-container .text{width:40%;max-width:50%;min-width:120px;display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container .text .container{display:table-cell;vertical-align:middle;text-align:left;padding-right:15px;}
.slider .slider-item .content .content-container .media{width:100%;min-width:50%;float:left;}.slider .slider-item .content .content-container .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .content-container .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container img,.slider .slider-item .content .content-container .media .media-wrapper .media-container iframe{border:1px solid #cccccc;}
.slider .slider-item .content .content-container .media{width:100%;min-width:50%;float:left;}.slider .slider-item .content .content-container .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .content-container .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container span.messege{display:block;vertical-align:middle;margin-left:auto;margin-right:auto;text-align:center;margin-top:50%;font-size:28px;font-weight:bold;text-transform:uppercase;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container img,.slider .slider-item .content .content-container .media .media-wrapper .media-container iframe{border:1px solid #cccccc;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map{line-height:normal;border:1px solid #cccccc;z-index:200;text-align:left;background-color:#ffffff;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map img{max-height:none !important;max-width:none !important;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .google-map{height:100%;width:100%;}
.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution{position:absolute;z-index:201;bottom:0px;width:100%;overflow:hidden;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution .attribution-text{height:19px;overflow:hidden;-webkit-user-select:none;line-height:19px;margin-right:60px;padding-left:65px;font-family:Arial,sans-serif;font-size:10px;color:#444;white-space:nowrap;color:#ffffff;text-shadow:1px 1px 1px #333333;text-align:center;}.slider .slider-item .content .content-container .media .media-wrapper .media-container .map .map-attribution .attribution-text a{color:#ffffff !important;}

110
timeline.js

@ -113,7 +113,7 @@ if (typeof VMM == 'undefined') {
youtube: {
active: false,
array: [],
api_loaded:false,
api_loaded: false,
que: []
},
@ -122,7 +122,21 @@ if (typeof VMM == 'undefined') {
map_active: false,
places_active: false,
array: [],
api_loaded:false,
api_loaded: false,
que: []
},
googledocs: {
active: false,
array: [],
api_loaded: false,
que: []
},
soundcloud: {
active: false,
array: [],
api_loaded: false,
que: []
}
@ -1837,24 +1851,29 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
} else if (m.type == "flickr") {
var flickr_id = "flickr_" + m.id;
mediaElem = "<a href='" + m.link + "' target='_blank'><img id='" + flickr_id + "_large" + "'></a>";
VMM.ExternalAPI.flickr.getPhoto(m.id, "#" + flickr_id);
VMM.ExternalAPI.flickr.get(m.id, "#" + flickr_id);
// GOOGLE DOCS
} else if (m.type == "googledoc") {
var googledocs_id = "googledoc_" + VMM.Util.unique_ID(5);
/*
if (m.id.match(/docs.google.com/i)) {
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='" + m.id + "&embedded=true'></iframe>";
} else {
mediaElem = "<iframe class='media-frame doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url=" + m.id + "&embedded=true'></iframe>";
}
*/
mediaElem = "<div class='media-frame doc' id='" + googledocs_id + "'><span class='messege'>Loading Document</span></div>";
VMM.ExternalAPI.googledocs.get(m.id, googledocs_id);
// YOUTUBE
} else if (m.type == "youtube") {
mediaElem = "<div class='media-frame video youtube' id='youtube_" + m.id + "'>Loading YouTube video...</div>";
VMM.ExternalAPI.youtube.init(m.id);
VMM.ExternalAPI.youtube.get(m.id);
// VIMEO
} else if (m.type == "vimeo") {
mediaElem = "<iframe class='media-frame video vimeo' autostart='false' frameborder='0' width='100%' height='100%' src='http://player.vimeo.com/video/" + m.id + "?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff'></iframe>";
// TWITTER
} else if (m.type == "twitter"){
mediaElem = "<div class='twitter' id='" + "twitter_" + m.id + "'>Loading Tweet</div>";
mediaElem = "<div class='twitter' id='" + "twitter_" + m.id + "'><span class='messege'>Loading Tweet</span></div>";
isTextMedia = true;
VMM.ExternalAPI.twitter.prettyHTML(m.id);
// TWITTER
@ -1863,13 +1882,13 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
// SOUNDCLOUD
} else if (m.type == "soundcloud") {
var soundcloud_id = "soundcloud_" + VMM.Util.unique_ID(5);
mediaElem = "<div class='media-frame soundcloud' id='" + soundcloud_id + "'>Loading Sound</div>";
VMM.ExternalAPI.soundcloud.getSound(m.id, soundcloud_id);
mediaElem = "<div class='media-frame soundcloud' id='" + soundcloud_id + "'><span class='messege'>Loading Sound</span></div>";
VMM.ExternalAPI.soundcloud.get(m.id, soundcloud_id);
// GOOGLE MAPS
} else if (m.type == "google-map") {
var map_id = "googlemap_" + VMM.Util.unique_ID(7);
mediaElem = "<div class='media-frame map' id='" + map_id + "'>Loading Map...</div>";
VMM.ExternalAPI.googlemaps.getMap(m.id, map_id);
mediaElem = "<div class='media-frame map' id='" + map_id + "'><span class='messege'>Loading Map</span></div>";
VMM.ExternalAPI.googlemaps.get(m.id, map_id);
// UNKNOWN
} else if (m.type == "unknown") {
trace("NO KNOWN MEDIA TYPE FOUND TRYING TO JUST PLACE THE HTML");
@ -2227,12 +2246,21 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
VMM.ExternalAPI = {
pushQues: function() {
if (VMM.master_config.googlemaps.active) {
VMM.ExternalAPI.googlemaps.pushQue();
}
if (VMM.master_config.youtube.active) {
VMM.ExternalAPI.youtube.pushQue();
}
if (VMM.master_config.soundcloud.active) {
VMM.ExternalAPI.soundcloud.pushQue();
}
if (VMM.master_config.googledocs.active) {
VMM.ExternalAPI.googledocs.pushQue();
}
},
twitter: {
@ -2418,7 +2446,7 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
http://maps.google.com/maps?q=Bavaria&hl=en&ll=47.597829,9.398804&spn=1.010316,2.709503&sll=37.0625,-95.677068&sspn=73.579623,173.408203&hnear=Bavaria,+Germany&t=m&z=10&output=embed
http://maps.google.com/maps?q=Zernikedreef+11,+Leiden,+Nederland&hl=en&sll=37.0625,-95.677068&sspn=45.957536,93.076172&oq=zernike&hnear=Zernikedreef+11,+Leiden,+Zuid-Holland,+The+Netherlands&t=m&z=16
*/
getMap: function(url, id) {
get: function(url, id) {
var timer;
var map_vars = VMM.Util.getUrlVars(url);
trace(map_vars);
@ -2684,10 +2712,38 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
},
googledocs: {
get: function(url, id) {
var doc = {url: url, id: id};
VMM.master_config.googledocs.que.push(doc);
VMM.master_config.googledocs.active = true;
},
creatDoc: function(doc) {
var mediaElem = "";
if (doc.url.match(/docs.google.com/i)) {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + doc.url + "&embedded=true'></iframe>";
} else {
mediaElem = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='http://docs.google.com/viewer?url=" + doc.url + "&embedded=true'></iframe>";
}
VMM.attachElement("#"+doc.id, mediaElem);
},
pushQue: function() {
for(var i = 0; i < VMM.master_config.googledocs.que.length; i++) {
VMM.ExternalAPI.googledocs.creatDoc(VMM.master_config.googledocs.que[i]);
}
VMM.master_config.googledocs.que = [];
}
},
//VMM.ExternalAPI.flickr.getPhoto(mediaID, htmlID);
flickr: {
getPhoto: function(mid, id) {
get: function(mid, id) {
// http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=6d6f59d8d30d79f4f402a7644d5073e3&photo_id=6115056146&format=json&nojsoncallback=1
var the_url = "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=" + Aes.Ctr.decrypt(VMM.master_config.keys.flickr, VMM.master_config.vp, 256) + "&photo_id=" + mid + "&format=json&jsoncallback=?";
VMM.getJSON(the_url, VMM.ExternalAPI.flickr.setPhoto);
@ -2724,19 +2780,33 @@ if(typeof VMM != 'undefined' && typeof VMM.ExternalAPI == 'undefined') {
/*
REFORMAT TO USE API FOR CUSTOM PLAYERS
*/
getSound: function(url, id) {
// http://soundcloud.com/oembed?iframe=true&url=http://soundcloud.com/erasedtapes/olafur-arnalds-poland
var the_url = "http://soundcloud.com/oembed?url=" + url + "&format=js&callback=?";
get: function(url, id) {
var sound = {url: url, id: id};
VMM.master_config.soundcloud.que.push(sound);
VMM.master_config.soundcloud.active = true;
},
createPlayer: function(sound) {
var the_url = "http://soundcloud.com/oembed?url=" + sound.url + "&format=js&callback=?";
VMM.getJSON(the_url, function(d) {
VMM.attachElement("#"+id, d.html );
VMM.attachElement("#"+sound.id, d.html);
});
},
pushQue: function() {
for(var i = 0; i < VMM.master_config.soundcloud.que.length; i++) {
VMM.ExternalAPI.soundcloud.createPlayer(VMM.master_config.soundcloud.que[i]);
}
VMM.master_config.soundcloud.que = [];
},
},
// VMM.ExternalAPI.youtube.init(id);
youtube: {
init: function(id) {
get: function(id) {
var timer;
if (VMM.master_config.youtube.active) {
trace(id);
@ -3481,15 +3551,11 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
}
var preloadTimeOutSlides = function() {
trace("preloadTimeOutSlides");
trace("CURRENT SLIDE: " + current_slide);
for(var j = 0; j < config.preload; j++) {
if ( !((current_slide + j) >= slides.length - 1)) {
trace("PRELOAD: " + (current_slide + j) );
slides[current_slide + j].show();
}
if ( !( (current_slide - j) < 0 ) ) {
trace("PRELOAD: " + (current_slide - j) );
slides[current_slide - j].show();
}
}
@ -5424,7 +5490,9 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
var _date = {};
var td_num = 0;
var td = _dates[0].startdate;
_date.startdate = VMM.Util.date.parse(data.startDate);
_date.startdate = _dates[0].startdate;
trace(_dates[0].startdate);
trace(_date.startdate);
if (td.getMonth() === 0 && td.getDate() == 1 && td.getHours() === 0 && td.getMinutes() === 0 ) {
// trace("YEAR ONLY");

Loading…
Cancel
Save