On ios and safari, you can't play it a second time. Ask for a solution.

clipboard.png

is played for the first time in safari, and then when you click play, the audio will be displayed directly to the end, and there is no way to play
by dragging the progress bar. This problem mainly occurs on mobile phones with high versions of safira and iOS. The second playback is tested on iOS8 and 9
.
Mar.14,2022

mounted(){
        var voice = document.getElementById('voice');
        // <audio>  play()
        voice&&voice.play();
        // WeixinJSBridge 
        if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
            voice&&voice.play();
        } else {
            //"WeixinJSBridgeReady"
            if (document.addEventListener) {
                document.addEventListener("WeixinJSBridgeReady", function(){
                    voice&&voice.play();
                }, false);
            } else if (document.attachEvent) {
                document.attachEvent("WeixinJSBridgeReady", function(){
                    voice&&voice.play();
                });
                document.attachEvent("onWeixinJSBridgeReady", function(){
                    voice&&voice.play();
                });
            }
        }
    },
    methods:{
        contorl(){
            let voice = document.getElementById('voice');
            if (voice.paused) {
                    voice.play();
                    this.vo.audioStatus = true
                }else{
                    voice.pause();
                    this.vo.audioStatus = false
                }



        }
    }
      

  
        
          
Menu