Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. <script>
  2. function PlayerRoduzir(id) {
  3. var id;
  4. change("https://api.xxxxxx.com/tracks/" + id +".mp3");
  5. var button1 = document.getElementById("play_" + id).style.display = "none";
  6. var button2 = document.getElementById("stop_" + id).style.display = "";
  7. }
  8.  
  9. function PlayerParar(id){
  10. var id;
  11. var audio = document.getElementById("player");
  12. var source = document.getElementById("mp3_src");
  13. var button1 = document.getElementById("play_" + id).style.display = "";
  14. var button2 = document.getElementById("stop_" + id).style.display = "none";
  15. audio.pause();
  16. }
  17. </script>
  18.  
  19. <?php
  20. echo "<button type='button' id='play_".$id."' onClick='PlayerRoduzir(".$id.");' class='btn btn-info'><i class="fa fa-play-circle-o" aria-hidden="true"></i></button> ";
  21. echo "<button type='button' style='display: none;' id='stop_".$id."' onClick='PlayerParar(".$id.");' class='btn btn-danger'><i class="fa fa-stop" aria-hidden="true"></i></button> ";
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement