Article From:

For example, a Android phone can be played, pause, open, and shut down on a Android phone, but on the apple cell phone, the sound is invalid and passed.setAttributeNo effect, please help to see, online urgent.

The example code is as follows

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
        font-size: 100px;
            line-height: 40px;
            font-size: 30px;
        <button id="start">Start playing < /button>< button id= "sound" > mute < /button>< video id= "MyVideo"Src=" "width=" 100% "height=" 90% "type=" video/mp4 "X5"-video-player-type= "H5" x5-video-player-fullscreen= "true" x5-video-orientation= "landscape" webkit-plAysinline='true'style= "object-fit: fill;" > < /video>< /div>< scriPt>Var video = document.getElementById ('myvideo');Document.getElementById ('starT').AddEventListener ('Click', function ()) {If (video.paused) { ();This.innerText = "pause";}else{Video.pause ();This.innerText = "start playback";}})Var flag = false;Document.gEtElementById ('sound').AddEventListener ('Click', function () {Flag =! Flag;VIDeo.muted = flag;If (flag) {This.innerText = "open sound";}else{This.innerText = "mute";}})< /script>< /body>&lT; /html>

Answer 0:

iOS safariMuted properties are not supported, and MDN can be consulted

Answer 1:

But now that IOS version is more than 10, it seems to support mute properties.

Leave a Reply

Your email address will not be published. Required fields are marked *