Pause / Unpause audio

  • I'm pulling my hair out. I've tried so many methods to get a single button to pause and unpause a sound file.... help please. I have a video button that is supposed to pause the sound if it's playing so the video can be heard, but if audio is not playing, nothing happens. Then when I turn off the video, I can go back to the sound button and togglepause the audio (the sound button function is simple togglepause of audio)

    THIS IS WHAT I"M TRYING TO DO:
    <plugin name="btn_video" .... onclick=" if audio is on - PAUSE, else NULL; TURN ON VIDEO" />
    <plugin name="btn_audio" ... onclick="if audio is on - PAUSE, else if audio is off - ON" />

    Is the audio and video audio somehow tied together causing the conflict?

  • Nevermind... I was looking at it all wrong. Instead of having the video button check for sound play, and then toggling it... I just used the pausesound(bgsnd); and it works. Too much stress to finalize this and I can't think straight. :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!