windhamdavid 4 years ago
parent
commit
8420dacd31
3 changed files with 97 additions and 73 deletions
  1. 16 50
      src/css/main.css
  2. 60 18
      src/index.html
  3. 21 5
      src/js/radio.js

+ 16 - 50
src/css/main.css

@@ -304,6 +304,10 @@ meter {
   vertical-align: middle !important;
 }
 
+#error-reconnecting {
+ 
+}
+
 @-webkit-keyframes progress-bar-stripes {
   from {
     background-position: 40px 0;
@@ -397,53 +401,6 @@ meter {
   overflow: hidden;
   line-height: 20px;
 }
-.progress .progressbar-back-text {
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  font-size: 12px;
-  line-height: 20px;
-  text-align: center;
-}
-.progress .progressbar-front-text {
-  display: block;
-  width: 100%;
-  font-size: 12px;
-  line-height: 20px;
-  text-align: center;
-}
-.progress.right .progress-bar {
-  right: 0;
-}
-.progress.right .progressbar-front-text {
-  position: absolute;
-  right: 0;
-}
-.progress.vertical {
-  width: 20px;
-  height: 100%;
-  float: left;
-  margin-right: 20px;
-}
-.progress.vertical.bottom {
-  position: relative;
-}
-.progress.vertical.bottom .progressbar-front-text {
-  position: absolute;
-  bottom: 0;
-}
-.progress.vertical .progress-bar {
-  width: 100%;
-  height: 0;
-  -webkit-transition: height 0.6s ease;
-  -o-transition: height 0.6s ease;
-  transition: height 0.6s ease;
-}
-.progress.vertical.bottom .progress-bar {
-  position: absolute;
-  bottom: 0;
-}
-
 
 /***********************************
 =========== Chat Rooms ============= 
@@ -460,12 +417,21 @@ li#Lobby_tab {
   display:none;
 }
 
+#fb_comments { 
+  height:380px; 
+  padding-bottom:10px; 
+  overflow: scroll; 
+}
+.fb-comments, .fb-comments iframe[style], .fb-comments span {
+   width: 100% !important;
+}
+
 video {
   background:#000;
-  width: 100%;
-  margin: 0 0 5px 0;
+  height: 260px;
+  margin: 0 5px 5px 0;
   vertical-align: top;
-  height: calc(50% - 12px);
+  width: calc(50% - 12px);
 }
 
 

File diff suppressed because it is too large
+ 60 - 18
src/index.html


+ 21 - 5
src/js/radio.js

@@ -133,7 +133,7 @@ amplitude_config = {
 			"url": "http://stream.davidawindham.com:8008/stream",
 			"live": true
 		}],
-	"amplitude_volume": 90
+	"amplitude_volume": 73
 }
 
 function get_radio_tower() {return 'img/radio.gif';}
@@ -142,19 +142,34 @@ function get_radio_eq() {return 'img/eq.gif';}
 function get_radio_eq_none() {return 'img/1.png';}
 
 var interval = null;
+
 $(document).ready(function() {
   interval = setInterval(radioTitle,20000); // every 20 seconds or stop polling
   $('#error-reconnecting').hide();
   $('#connection-error-retry').on('click', function () {
-      var $btn = $(this).button('reconnecting...')
       radioTitle();
       $('#error-reconnecting').show();
-      $('#connection-error-reconnecting').progressbar();
-      $btn.button('reset')
+      $('#connection-error-reconnecting').attr('data-transitiongoal', 100).progressbar();
     })
 });
 
-radioTitle(); // call it once on load to avoid 20s delay
+$('#amplitude-play-pause').click(function() {
+  radioTitle();
+});
+
+$('#connection-error-retry').click(function() {
+  setTimeout(function () {
+      $('#connection-error').modal('hide');
+  }, 2000);
+  setTimeout(function () {
+      radioTitle();
+      $('#connection-error-reconnecting').attr('data-transitiongoal', 0).progressbar();
+      $('#error-reconnecting').hide();
+      
+  }, 3000);
+});
+
+//radioTitle(); // call it once on load to avoid 20s delay
 
 function radioTitle() {
     var url = 'http://stream.davidawindham.com/status2.xsl';
@@ -170,6 +185,7 @@ function radioTitle() {
           $('#connection-error').modal('show');
         	$('#radio').attr('src', get_radio_none()).fadeIn(300);
         	$('#eq').attr('src', get_radio_eq_none()).fadeIn(300);
+          clearInterval(interval);
         }
         else {
           $('#track').text(json[mountpoint].title);