Bhavik Patel
Bhavik Patel

Reputation: 1074

Safari - Audio Management for inactive tabs

Problem

In our enterprise React application, we're experiencing audio playback issues in Safari with the following scenario:

  1. The app contains an iframe that plays MP3 narrations using Howler.js
  2. When the tab becomes inactive due to no user activity, Safari kills the resources and stops the audio
  3. Upon returning to the tab and interacting, all functionality resumes except for audio playback
  4. Currently, the only workaround is closing the tab and opening a new one

Question

Is there a way to restore audio playback functionality when the tab becomes active again, without requiring a tab refresh?

Technical Details

  1. Framework: React Audio
  2. Library: Howler.js
  3. Browser: Safari Content
  4. MP3 files played within an iframe

Expected Behavior

Audio playback should resume normally when returning to the tab and interacting with it.

Current Behavior

Audio remains non-functional after tab becomes active again, requiring a complete tab refresh to restore functionality.

Upvotes: 0

Views: 25

Answers (0)

Related Questions