Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript How to have two audio players on one page?

alenmilky

New Coder
I would like to have two html audio players in a table, looking like this: http://italo-disco.net/Image1.gif
So far I have only one working player. Also, cell is too high because of something about player and player is not in the middle of a cell. So far I have this: http://italo-disco.net/222.html Can you help me please with a code to have erything as in the picture? And are there some parts of a code that I can remove? Thank you!

Code:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Circular Html5 Audio Player Demo</title>
    <link href="https://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="https://www.jqueryscript.net/demo/Circular-Html5-Audio-Player-jQuery/progres-bar.css">
    <style>
    html { min-height:100vh;}
    body { background-color:#fafafa; font-family:'Roboto';}
    .container { margin:150px auto; max-width:960px;}
    .mediPlayer { float:left; margin:20px;}
    </style>
</head>
<body>
<table width="400" border="1" align="center">
  <tr valign="top">
    <td width="33%"><div align="center">
        <!-- Media Player-->
        <div class="mediPlayer"> <audio class="listen" preload="none" data-size="50" src="http://65.21.202.84:8356/stream?type=http&nocache=5"></audio>
        </div>
        <!-- Media Player / -->
        <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
        <script src="https://www.jqueryscript.net/demo/Circular-Html5-Audio-Player-jQuery/player.js"></script>
        <script>
    $(document).ready(function () {
        $('.mediPlayer').mediaPlayer();
    });
</script>
        <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-36251023-1']);
  _gaq.push(['_setDomainName', 'jqueryscript.net']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
      </div></td>
    <td width="33%"><div align="center">
        <p>&nbsp;</p>
      </div></td>
  </tr>
  <tr valign="top">
    <td><div align="center">320 kbps</div></td>
    <td><div align="center">96 kbps</div></td>
  </tr>
</table>
</body>
</html>
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom