Cara membuat button play dan pause musik di html

Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated
kali ini admin  mau ngasih tutorial dibawah ini:
langsung saja copas sc dibawah ini

<audio id="lagu" autoplay="autoplay" class="w-50">
<source src="link lagu" type="audio/mpeg">
</audio>
<br>
<button onclick="playVid()" type="button" class="btn btn-primary btn-sm">Play</button>
<button onclick="pauseVid()" type="button" class="btn btn-secondary btn-sm">Pause</button>
<script>
                    var vid = document.getElementById("lagu");
                    // Play
                   function playVid() {
                      vid.play();
                    }
                    function pauseVid() {
                      vid.pause();
                    }
    </script>
            

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.