create catalog /js with scripts from index.php
This commit is contained in:
		
							
								
								
									
										28
									
								
								js/audio.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								js/audio.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
var audio = new Audio('http://stream.santic-zombie.ru');
 | 
			
		||||
 | 
			
		||||
var play = document.getElementById('play');
 | 
			
		||||
play.addEventListener('click', function() {
 | 
			
		||||
  $("#myPlay").text("Now playing:");
 | 
			
		||||
  audio.play();
 | 
			
		||||
  }, false);
 | 
			
		||||
 | 
			
		||||
var pause = document.getElementById('pause');
 | 
			
		||||
pause.addEventListener('click', function() {
 | 
			
		||||
  $("#myPlay").text("Paused");
 | 
			
		||||
  audio.pause();
 | 
			
		||||
  }, false);
 | 
			
		||||
 | 
			
		||||
audio.addEventListener("timeupdate", function() {
 | 
			
		||||
  var duration = document.getElementById('duration');
 | 
			
		||||
  var s = parseInt(audio.currentTime % 60);
 | 
			
		||||
  var m = parseInt((audio.currentTime / 60) % 60);
 | 
			
		||||
  var h = parseInt((audio.currentTime / 3600) % 60);
 | 
			
		||||
  if (s < 10) s = '0' + s;
 | 
			
		||||
  if (m < 10) m = '0' + m;
 | 
			
		||||
  if (h < 10) h = '0' + h;
 | 
			
		||||
  duration.innerHTML = h + ':' + m + ':' + s;
 | 
			
		||||
  }, false);
 | 
			
		||||
 | 
			
		||||
$("#volume").mousemove(function(){
 | 
			
		||||
  audio.volume = parseFloat(this.value / 10);
 | 
			
		||||
  });
 | 
			
		||||
							
								
								
									
										31
									
								
								js/radio.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								js/radio.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
function show()
 | 
			
		||||
{
 | 
			
		||||
  $.ajax({
 | 
			
		||||
    url: '../trackname.php',
 | 
			
		||||
    cache: false,
 | 
			
		||||
    success: function(html){
 | 
			
		||||
      $('#title').html(html);
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$(document).ready(function(){
 | 
			
		||||
  show();
 | 
			
		||||
  setInterval('show()',5000);
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
function show1()
 | 
			
		||||
{
 | 
			
		||||
  $.ajax({
 | 
			
		||||
    url: '../online.php',
 | 
			
		||||
    cache: false,
 | 
			
		||||
    success: function(html){
 | 
			
		||||
      $('#listeners').html(html);
 | 
			
		||||
    }
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$(document).ready(function(){
 | 
			
		||||
  show1();
 | 
			
		||||
  setInterval('show1()',5000);
 | 
			
		||||
  });
 | 
			
		||||
		Reference in New Issue
	
	Block a user