Skip to content

fix: mute zero-volume video clips on iOS - #308

Open
drinovac wants to merge 1 commit into
shotstack:mainfrom
drinovac:fix/ios-zero-volume-preview
Open

drinovac wants to merge 1 commit into
shotstack:mainfrom
drinovac:fix/ios-zero-volume-preview

Conversation

@drinovac

Copy link
Copy Markdown
Contributor

Why this change was needed

iOS Safari can ignore writes to a video element’s volume, so Studio previews can play a clip’s original audio even when the edit sets asset.volume: 0.

What changed

  • Set the native muted flag before loading and playing a zero-volume clip. Restore audio when the clip volume increases.
  • Add a regression test that simulates ignored volume writes. It fails before the fix and passes with it. The full SDK suite passes (2,618 tests).

Problem solved

Zero-volume clips stay silent in preview while clips configured with sound remain eligible for playback. Device playback still needs verification.

Set the video element’s muted state for clips configured with zero volume so Safari keeps them silent even when it ignores volume writes. Add regression coverage for muting before playback and restoring sound when the clip volume increases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant