javascript - Play a mp3 file from a selected list form -


i need select mp3 or wave file pull down menu play, pause, stop , change volume. got started code w3cl plays first selection (normal) not play (ar or ps) need add volume control

enter code here

<audio id="mytune"> <source src="normal.mp3"> <source src="ar.mp3"> <source src="ps.mp3"> </audio>  <button onclick="document.getelementbyid('mytune').play()">play music</button> <button onclick="document.getelementbyid('mytune').pause()">pause music</button> <button onclick="document.getelementbyid('mytune').pause();        document.getelementbyid('mytune').currenttime = 0;">stop music</button>     select name="mytune" onchange='mytune(this.value);'>   <option value="normal.mp3" selected>  normal                <option value="ar.mp3"> aortic regurgitation                <option value="ps.mp3"> pulmonary stenosis  </select>  <input type="text" name="mytune" id="mytune" style='display:none;'/>   </body>  </html> 


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -