We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Sound Play/Pause toggle button

Home Forums Puzzles Sound Play/Pause toggle button

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #60564
    auriea
    Customer

    I am just starting to figure out how sound can work within my project and I’m not sure how to approach making a toggle button to pause the sound from playing. Also not sure if what I want is mute/unmute instead? Does anyone have an example of doing this sort of thing I can have a look at. I’ve attached what I started with.

    Attachments:
    You must be logged in to view attached files.
    #60568
    kdv
    Participant

    In your case this puzzle will never return “true” because your variable is not a media element, it’s a list of objects.

    Use this construction (check the first sound in the list)

    Puzzles and JS. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.

    #60576
    auriea
    Customer

    ah. ok. i was going to come back to your first suggestion. because it was leading me to an interesting solution. but of course I will try this correction.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.