Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[video_player] Reduce server dependencies in tests #5103

Conversation

stuartmorgan-g
Copy link
Contributor

Reduce test dependencies on servers that the Flutter team doesn't control:

  • Switches video_player webm URL to the GitHub URL for the example asset,
    matching the existing mp4 setup
  • Switches video_player m3u8 URL to the assets-for-api-docs URL that was
    recently added for a native iOS video_player test

Ideally these would use local web severs, but initial attempts to
serve binary assets via the local web server didn't work, and I won't have
time to investigate further in the short term. This is an incremental
improvement, and adds TODOs to fully convert.

No CHANGELOG change: Only internal test details are changing

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

@ditman
Copy link
Member

ditman commented Mar 23, 2022

Ha! I just needed to do something similar for video_player_web (not merged yet): 94b821a

@@ -56,7 +59,7 @@ void main() {
(WidgetTester tester) async {
final VideoPlayerController networkController =
VideoPlayerController.network(
'https://cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8',
'https://flutter.github.io/assets-for-api-docs/assets/videos/hls/bee.m3u8',
Copy link
Member

Choose a reason for hiding this comment

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

How do you upload stuff to assets-for-api-docs? Is it the website repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a separate repo; this was: flutter/assets-for-api-docs#178

@stuartmorgan-g stuartmorgan-g merged commit 8624a5f into flutter:main Mar 23, 2022
@stuartmorgan-g stuartmorgan-g deleted the reduce-server-depencies-video-player branch March 23, 2022 20:13
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 24, 2022
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Reduce test dependencies on servers that the Flutter team doesn't control:

- Switches webm URL to the GitHub URL for the example asset,
  matching the existing mp4 setup
- Switches m3u8 URL to the assets-for-api-docs URL that was
  recently added for a native iOS video_player test

Ideally these would use local web severs, but initial attempts to
serve binary assets via the local web server didn't work, and I won't have
time to investigate further in the short term. This is an incremental
improvement, and adds TODOs to fully convert.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants