Widget:AudioPlayer2: Difference between revisions

From The Midnight Wiki
No edit summary
Tag: Manual revert
Line 2: Line 2:


== Sample result ==
== Sample result ==
{{#widget:AudioPlayer2|mp3=https://themidnight.wiki/images/9/9e/Carl_Sagan_Show_Intro.mp3}}
 
</noinclude>
</noinclude>


<includeonly>
<includeonly>
<html>
<html>
<script>
var state=0;
$(window).load(function(){
            $(".loader").hide();
            $(".player").show();
        });
$(document).ready(function(){
$(".power").click(function(){
  $(".record").toggleClass('on');
  $(".stick").toggleClass('play');
  if(state==0){
  setTimeout(function(){
  $(".mysong")[0].play();
  },1000);
  state=1;
  }
  else{
  $(".mysong")[0].pause();
  state=0;
  }
  $(".slider").change(function(){
  $(".mysong")[0].volume=this.value;
  });
  });
 
});
</script>
<style>
<style>


Line 168: Line 195:
}
}
</style>
</style>
<script>
var state=0;
$(window).load(function(){
            $(".loader").hide();
            $(".player").show();
        });
$(document).ready(function(){
$(".power").click(function(){
  $(".record").toggleClass('on');
  $(".stick").toggleClass('play');
  if(state==0){
  setTimeout(function(){
  $(".mysong")[0].play();
  },1000);
  state=1;
  }
  else{
  $(".mysong")[0].pause();
  state=0;
  }
  $(".slider").change(function(){
  $(".mysong")[0].volume=this.value;
  });
  });
 
});
</script>
<div class="loader">LOADING</div>
<div class="loader">LOADING</div>
<div class="player">
<div class="player">

Revision as of 22:01, 12 June 2023


Sample result