Created
July 6, 2010 13:12
-
-
Save arestov/465365 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"> | |
<head> | |
<title>ss</title> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> | |
<script type="text/javascript"> | |
var external_playlist = function(array){ //array = [{artist: '', title: '', duration: '', link: ''}] | |
this.result = this.header + '\n'; | |
for (var i=0; i < array.length; i++) { | |
this.result += this.preline + ':' + (array[i].duration || '-1') + ',' + array[i].artist + ' - ' + array[i].title + '\n' + array[i].link + '\n'; | |
}; | |
this.result; | |
} | |
external_playlist.prototype = { | |
header : '#EXTM3U', | |
preline: '#EXTINF', | |
} | |
var zsz = { | |
duration:233, | |
artist: 'Example Artist', | |
title: " Example Title", | |
link: 'http://cs4653.vkontakte.ru/u5064472/audio/ea5de9393fd6.mp3' | |
} | |
var kekekax = [zsz, zsz, zsz, zsz, zsz, zsz] | |
var url_desc = 'data:audio/x-mpegurl; charset=utf-8,'; | |
var plzs = new external_playlist(kekekax).result | |
document.addEventListener('click', function(){ | |
window.open(url_desc+ escape(plzs)); | |
},false) | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment