mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 02:39:47 +02:00
i've got a working html 5 player in jquery
This commit is contained in:
parent
f21379318f
commit
3274f70dad
4 changed files with 13 additions and 10 deletions
|
@ -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]);
|
||||
|
|
|
@ -19,6 +19,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#html5_player {
|
||||
min-width=250px;
|
||||
}
|
||||
|
||||
|
||||
#html5_player #albumart img
|
||||
{
|
||||
width: 200px;
|
||||
|
|
|
@ -63,11 +63,11 @@ foreach($playlist->urls as $item)
|
|||
<div id="album"><?php echo T_('Loading...') ?></div>
|
||||
<div id="artist"><?php echo T_('Loading...') ?></div>
|
||||
<div id="progress_text"><?php echo T_('Loading...') ?></div>
|
||||
<button id="stop" accesskey="<?php echo T_dgettext('html5_player_accesskey', 'o') ?>"><?php echo T_('Stop') ?></button>
|
||||
<button id="play" accesskey="<?php echo T_dgettext('html5_player_accesskey', 'p') ?>"><?php echo T_('Play') ?></button>
|
||||
<button id="pause" accesskey="<?php echo T_dgettext('html5_player_accesskey', 'p') ?>"><?php echo T_('Pause') ?></button>
|
||||
<button id="previous" accesskey="<?php echo T_dgettext('html5_player_accesskey', ',') ?>"><?php echo T_('Previous') ?></button>
|
||||
<button id="next" accesskey="<?php echo T_dgettext('html5_player_accesskey', '.') ?>"><?php echo T_('Next') ?></button>
|
||||
<button id="stop" accesskey="<?php echo T_dgettext('html5_player_accesskey', 'o') ?>"><?php echo T_('Stop') ?></button>
|
||||
</div>
|
||||
<div>
|
||||
<ul id="playlist">
|
||||
|
|
|
@ -36,7 +36,6 @@ a img, :link img, :visited img { border: 0; } /* no blue linked image borders */
|
|||
body {
|
||||
background:#d3d3d3;
|
||||
font-family:Arial, Helvetica, Sans-Serif;
|
||||
min-width:1000px;
|
||||
}
|
||||
p {
|
||||
color: #000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue