Skip to content

fix(windows): clear video source when src is empty#4899

Open
vivekjm wants to merge 1 commit into
TheWidlarzGroup:support/6.x.xfrom
vivekjm:fix-windows-null-source
Open

fix(windows): clear video source when src is empty#4899
vivekjm wants to merge 1 commit into
TheWidlarzGroup:support/6.x.xfrom
vivekjm:fix-windows-null-source

Conversation

@vivekjm
Copy link
Copy Markdown

@vivekjm vivekjm commented May 12, 2026

Summary

Fixes #3188.

Motivation

On Windows, setting <Video source={null} /> after a video has already loaded should clear the current source. Instead, the Windows view manager only handled non-null src updates, and an empty uri could still be passed through to the WinRT Uri constructor. That leaves the player in a bad state and can crash when the app is trying to stop playback.

Changes

  • Add a small Windows helper to pause the player and clear its media source
  • Treat src: null, missing uri, and empty uri as a clear-source update
  • Keep the existing non-empty URI path unchanged

Test plan

  • Checked the Windows prop flow locally against the reported source={null} case
  • Reviewed the diff to keep the change scoped to Windows source handling

I do not have a Windows dev environment available in this macOS workspace, so I was not able to run the native Windows sample build locally.

@vivekjm vivekjm force-pushed the fix-windows-null-source branch from caa778f to 95d9c48 Compare May 12, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

1 participant