Skip to content

Support local files in BpkVideoPlayer#2750

Merged
Henrik Sym (henrik-sky) merged 2 commits into
mainfrom
donburi/DON-3004_BpkVideo_support_local_files
Jul 16, 2026
Merged

Support local files in BpkVideoPlayer#2750
Henrik Sym (henrik-sky) merged 2 commits into
mainfrom
donburi/DON-3004_BpkVideo_support_local_files

Conversation

@henrik-sky

@henrik-sky Henrik Sym (henrik-sky) commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Use Media3 DefaultDataSource so BpkVideoPlayer supports local cached files and HTTPS URLs.
  • Document local file-path support.

Why

The previous HTTP-only data source rejected local cache paths with `MalformedURLException: no protocol`.

Validation

  • detekt passed.
Standard animations Reduced animations
Screen_recording_20260716_152216.mp4
Screen_recording_20260716_151634.mp4

@henrik-sky Henrik Sym (henrik-sky) added the patch A backwards compatible change/fix label Jul 16, 2026
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor
Warnings
⚠️ One or more component files were updated, but the tests weren't updated. If your change is not covered by existing tests please add snapshot tests.
⚠️

One or more component files were updated, but the docs screenshots weren't updated. If the changes are visual or it is a new component please regenerate the screenshots via ./gradlew recordScreenshots.

Generated by 🚫 Danger Kotlin against b716d3c

@henrik-sky
Henrik Sym (henrik-sky) marked this pull request as ready for review July 16, 2026 14:21
Copilot AI review requested due to automatic review settings July 16, 2026 14:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds support for playing locally cached video files in BpkVideoPlayer by switching from an HTTP-only Media3 data source to DefaultDataSource, and updates docs to reflect the new accepted videoUrl inputs.

Changes:

  • Replace DefaultHttpDataSource-only configuration with DefaultDataSource so non-HTTP URIs (e.g., local files) are supported.
  • Update VideoPlayer documentation to mention local file path support.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/compose/VideoPlayer/README.md Documents that videoUrl can now be a local file path (in addition to remote URLs).
backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/videoplayer/internal/PlayerFactory.kt Switches ExoPlayer media source factory to DefaultDataSource to allow local/file URIs.

Comment thread docs/compose/VideoPlayer/README.md Outdated
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor
Warnings
⚠️ One or more component files were updated, but the tests weren't updated. If your change is not covered by existing tests please add snapshot tests.
⚠️

One or more component files were updated, but the docs screenshots weren't updated. If the changes are visual or it is a new component please regenerate the screenshots via ./gradlew recordScreenshots.

Generated by 🚫 Danger Kotlin against 944614f

@henrik-sky
Henrik Sym (henrik-sky) enabled auto-merge (squash) July 16, 2026 15:08
@henrik-sky
Henrik Sym (henrik-sky) merged commit 3a8d7c5 into main Jul 16, 2026
19 checks passed
@henrik-sky
Henrik Sym (henrik-sky) deleted the donburi/DON-3004_BpkVideo_support_local_files branch July 16, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch A backwards compatible change/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants