Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

147
Visualizações
Next song doesn't play in ios when the app is in background mode

I'm using Video tag in react native to create a media player.

The audio is getting played in background but the media player stops when the song is finished. I'll have to turn the screen on again and then the song changes automatically. After that I can again put the app on background or the phone on sleep mode.

enter image description here

I have also added other properties to this Video tag.

  1. audioOnly={true}
  2. playInBackground={true}
  3. playWhenInactive={true}
  4. onEnd={() => this.handleMusicEnd()}
  5. ignoreSilentSwitch="ignore"

The function this.handleMusicEnd() is responsible for changing the state of current song.

I enabled the background audio from Xcode to play the audio in background or sleep mode. enter image description here

What can be the reason here ? The flow works fine on Android.

about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda