1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-04 02:09:23 +02:00

i've got a working html 5 player in jquery

This commit is contained in:
John Moore 2013-07-31 23:12:35 -05:00
parent f21379318f
commit 3274f70dad
4 changed files with 13 additions and 10 deletions

View file

@ -114,13 +114,13 @@ function ended(event)
function search(event)
{
var search = new RegExp(".*" + $('#input_search').val() + ".*", "i");
$.each(playlist_items, function (index, item) {
if (!search.test(item.title)) {
item.element.hide();
$.each(playlist_items, function (index, item) {
if (!search.test(item.title)) {
item.element.hide();
}
else {
item.element.show();
}
else {
item.element.show();
}
});
}
function clear_search(event)
@ -135,9 +135,8 @@ $(document).ready(function() {
{
var li = $('<li>');
$('#playlist').append(li);
playlist_items[id].play_url += '&transcode_to=mp3';// + (Prototype.Browser.IE || Prototype.Browser.WebKit || Prototype.Browser.MobileSafari ? 'mp3' : 'ogg');
li.html($('<span>').append(playlist_items[id].title));
playlist_items[id].player = $('<audio>').attr('preload', 'none').attr('src', playlist_items[id].play_url)[0]; //new Element("audio", {preload: Prototype.Browser.IE ? 'auto' : 'none', src : playlist_items[id].play_url});
playlist_items[id].player = $('<audio>').attr('preload', 'none').attr('src', playlist_items[id].play_url)[0];
var player = $(playlist_items[id].player);
li.append(playlist_items[id].player);
li.data('playlist_item', playlist_items[id]);