Skip to content

[BUG] iOS silence mode doesn't play on .playUrl #159

@Stephane-Parent

Description

@Stephane-Parent

Describe the bug
When playing a sound from SoundPlayer.playUrl, no sound comes out if the Silence mode is ON (little switch on iPhone side).

To Reproduce
Steps to reproduce the behavior:

  1. Boot your app
  2. Play a sound with SoundPlayer.playUrl()
  3. Hear the sound
  4. Switch to silence mode
  5. No more sound

Expected behavior
Expose a function to enable sound on silence mode. It would be more convenient to manage when to respect silence mode.

Platform (please complete the following information):

  • OS: iOS
  • lib version 0.13.2

Additional context
I bypass it by calling SoundPlayer.setSpeaker(false) before seeking. Seems like [session setActive:true error:nil]; is needed to bypass the Silence Mode. Once this function is called, Silence mode won't be respected anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions