Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!