Skip to content

fix(SUP-51302): fix _setSrc() returning wrong promise causing iOS playback failure#868

Open
ravitshalem with Copilot wants to merge 1 commit into
masterfrom
copilot/review-pr-playback-issue-ios
Open

fix(SUP-51302): fix _setSrc() returning wrong promise causing iOS playback failure#868
ravitshalem with Copilot wants to merge 1 commit into
masterfrom
copilot/review-pr-playback-issue-ios

Conversation

Copilot AI commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Description of the Changes

Root cause: _setSrc() in NativeAdapter was returning requestFilterPromise — the original request-filter promise — instead of the fully chained promise that sets videoElement.src and fetches the HLS manifest. The chained .then() block was completely detached (fire-and-forget), so the caller in load() received a promise that resolved immediately, before the src was ever set. This caused videoElement.load() to be called on an empty video element, preventing playback on iOS where NativeAdapter is used for native HLS.

Changes:

  1. Return the chained promise from _setSrc() so load() correctly waits for videoElement.src to be set before calling videoElement.load().
  2. Reset the manifest handler before each fetch to prevent stale audio track data from accumulating when _setSrc() is called more than once (e.g. on video-track switch or decode-error recovery).

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Docs have been updated

…yback failure

Agent-Logs-Url: https://github.com/kaltura/playkit-js/sessions/30e0b578-2e66-46c0-938b-a8074c2a4592

Co-authored-by: ravitshalem <31099969+ravitshalem@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants