HTML5 iPhone Safari Mobile renders something rather than a quick time symbol when creating an audio tag

I am writing a very simple webpage in html5 for iPhone. page - this does not work          

Everything works, but on the page with the iPhone I see the QuickTime logo with a slash and if I click on it, the player will display a play button and the quick time logo will appear in the background. Can logos be replaced with a personal image? thanks in advance.

+3
source share
3 answers

You can hide the tag using CSS and instead create an HTML element that fires QuickTime using the onclick JavaScript event.

Sort of:

<audio src="track.mp3" controls></audio>
<div id="play-button">Play</div>

<script>
function playAudio() {
    var audioPlayer = document.getElementsByTagName("audio")[0];
    audioPlayer.play();
}

var playButton = document.getElementById("play-button");
button.addEventListener("click",playAudio,false);
</script>

/ Quicktime, .

+1

- iPhone,

jQTouch framework.

mp3 , .

0

, .

0

Source: https://habr.com/ru/post/1738519/


All Articles