Permalink
Browse files

misc

  • Loading branch information...
RJ committed Jan 6, 2010
1 parent ab7dd14 commit e8cdb248ecce27df840ee62c29f1cb6e2ade9f3c
Showing with 42 additions and 26 deletions.
  1. +33 −24 www/player/index.html
  2. +3 −2 www/player/scripts/player.js
  3. +6 −0 www/player/stylesheets/player.css
View
@@ -1,3 +1,27 @@
+<!--
+ This HTML based on the cloud player:
+
+ Copyright (c) 2008 Henrik Berggren & Eric Wahlforss
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@@ -10,23 +34,6 @@
<script type="text/javascript" src="scripts/ui.slider.js"></script>
<script type="text/javascript" src="scripts/playdar.js"></script>
<script src="scripts/player.js" type="text/javascript"></script>
- <!--
- <script type="text/javascript" src="/scripts/firebugx.js"></script>
- <script src="/scripts/jquery-1.3.1.min.js" type="text/javascript"></script>
- <script src="/scripts/soundmanager2.js" type="text/javascript"></script>
- <script type="text/javascript" src="/scripts/md5.js"></script>
- <script type="text/javascript" src="/scripts/ui.core.js"></script>
- <script type="text/javascript" src="/scripts/ui.datepicker.js"></script>
- <script type="text/javascript" src="/scripts/ui.draggable.js"></script>
- <script type="text/javascript" src="/scripts/ui.droppable.js"></script>
- <script type="text/javascript" src="/scripts/ui.slider.js"></script>
- <script type="text/javascript" src="/scripts/ui.sortable.js"></script>
- <script type="text/javascript" src="/scripts/jquery.history_remote.js"></script>
- <script type="text/javascript" src="/scripts/jquery.cookie.js"></script>
- <script src="/scripts/utils.js{% if in_development_enviroment %}?v= {{rando}} {% endif %}" type="text/javascript"></script>
- <script src="/scripts/player.js{% if in_development_enviroment %}?v= {{rando}} {% endif %}" type="text/javascript"></script>
- <script src="/scripts/playlist.js{% if in_development_enviroment %}?v= {{rando}} {% endif %}" type="text/javascript"></script>
- -->
</head>
<body unselectable="on">
@@ -70,16 +77,18 @@
??? - ???
</div>
- <div id="position">00:00</div>
+ <div id="position">00:00</div>
+ <div id="duration">00:00</div>
<div id="progress">
- <div id="elapsed"></div>
- </div>
-
- <div id="duration">00:00</div>
- </div>
-
+ <div id="elapsed"></div>
+ <div id="buffered"></div>
</div>
+
+ <!--
+ </div>
+ </div>
+ -->
<!-- TEMPLATES -->
@@ -134,7 +134,7 @@ Player.prototype = {
});
MK.bufferPercent.connect(function(pc){
- // $('#loaded').css('width', pc +'%');
+ //$('#buffered').css('width', pc +'%');
});
MK.volumeChanged.connect(function(v){
@@ -326,7 +326,8 @@ Playlist.prototype = {
var url = res[this.lastResultIndex].url || Playdar.client.get_stream_url(res[this.lastResultIndex].sid);
p.play(res[this.lastResultIndex], url);
}else{
- alert('playing next, no more alts');
+ $('#'+qid).addClass('failed');
+ //alert('playing next, no more alts');
this.playNext();
}
},
@@ -214,6 +214,8 @@ table {
table.playlist .status { width: 110px; }
table.playlist .duration { width: 50px; }
+ table.playlist .failed { background-color: lightred; }
+
/* table tbody tr:nth-child(even):hover {
background: rgba(255,255,150,0.2);
}
@@ -233,6 +235,7 @@ table {
display: none;
}
+
h4 {
margin: 0;
}
@@ -556,6 +559,9 @@ table {
#elapsed {
background-color: green; width:0; height:3px;
}
+ #buffered {
+ background-color: red; width:75%; height:3px;
+ }
#position {
position: absolute;

0 comments on commit e8cdb24

Please sign in to comment.