Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Player Networking Caching Update #5

Open
wants to merge 1,112 commits into
base: caching
Choose a base branch
from

Conversation

mavericksunny
Copy link

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • 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 Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

keyonghan and others added 30 commits September 14, 2021 22:02
…eption when being replaced in the `VideoPlayer` (flutter#4344)

* fix: do not removeListener if VideoPlayerController is already disposed

Co-authored-by: David Iglesias Teixeira <ditman@gmail.com>
* feat: Add Support for Video Recording in Camera Web
* docs: add video recording documentation

Co-authored-by: Bartosz Selwesiuk <bselwesiuk@gmail.com>
* feat: add web to the example app
* docs: update README and point users to camera_web for more web-specific info.
Creates a new command to validate that PRs don't change platform interface packages and implementations at the same time, to try to prevent ecosystem-breaking changes. See flutter/flutter#89518 for context.

Per the explanation in the issue, this has carve-outs for:
- Changes to platform interfaces that aren't published (allowing for past uses cases such as making a substantive change to an implementation, and making minor adjustments to comments in the PI package based on those changes).
- Things that look like bulk changes (e.g., a mass change to account for a new lint rule)

Fixes flutter/flutter#89518
…age (flutter#4343)

* Setup webview_flutter_android package.

Creates a new `webview_flutter_android` directory and adds
the following meta-data files:
- `AUTHORS`: copied from the `webview_flutter` package and added my name;
- `CHANGELOG.md`: new file adding description for release 0.0.1;
- `LICENSE`: copied from the `webview_flutter` package;
- `README.md`: new file adding the standard platform implementation
  description;
- `pubspec.yaml`: new file adding package meta-data for the
  `webview_flutter_android` package.

* Direct copy of "android" folder.

A one to one copy of the `webview_flutter/android` folder to
`webview_flutter_android/` using the following command:
```
cp -R ./webview_flutter/android ./webview_flutter_android/
```

* Direct copy of Android specific .dart files.

Copied the Android specific .dart files over from the
`./webview_flutter` package. Note that the `SurfaceAndroidWebView` class
in the `./webview_flutter_android/lib/webview_surface_android.dart` file
is copied directly (without modifactions) from the
`./webview_flutter/lib/webview_flutter.dart` file.

* Modify .dart code to work with platform_interface.

Make sure the `AndroidWebView` and `SurfaceAndroidWebView` widgets
extend the `WebViewPlatform` class from the
`webview_flutter_platform_interface` package correctly by accepting an
instance of the `JavascriptChannelRegistry` class.

* Direct copy of the `webview_flutter/example` app.

This commit makes a direct copy of the `webview_flutter/example` app to
the  `webview_flutter_android` package. After the copy the `example/ios`
folder is removed as it doesn't serve a purpose in the Android specific
package. Commands run where:
```
cp -R ./webview_flutter/example ./webview_flutter_android/
rm -rf ./webview_flutter_android/example/ios
```

* Update example to Android specific implementation.

This commit updates the example App so it directly implements an Android
specific implementation of the webview_flutter_platform_interface.

* Update integration tests.

Updated the existing integration tests (copied from webview_flutter
package) so they work correctly with the implementation of the
webview_flutter_android package.

* Update webview_flutter_platform_interface dependency

Updated the pubspec.yaml to depend on version 1.0.0 of the
webview_flutter_platform_interface package instead of using a path
reference (which is now possible since the platform interface package
has now been published).

Co-authored-by: BeMacized <bodhimulders@bemacized.net>

* Use different bundle ID for Android example app.

Make sure the `webview_flutter` and `webview_flutter_android` example
apps use different application identifiers so that the CI doesn't run
into problems.

* Skip flaky integration_tests (issue 86757).

* Exlude platform implementations from build all step.

Make sure the webview_flutter_android and webview_flutter_wkwebview
packages are excluded from the Build All plugins step as they will cause
conflicts with the current implementation which is still part of the
webview_flutter package.

* Split helper classes from main example widget.

Move the `WebView` and related `WebViewController` classes from the
main.dart into a separate web_view.dart file.

Co-authored-by: BeMacized <bodhimulders@bemacized.net>
…ckage (flutter#4345)

* Setup webview_flutter_wkwebview package.

Creates a new `webview_flutter_wkwebview` directory and adds
the following meta-data files:
- `AUTHORS`: copied from the `webview_flutter` package and added my name;
- `CHANGELOG.md`: new file adding description for release 0.0.1;
- `LICENSE`: copied from the `webview_flutter` package;
- `README.md`: new file adding the standard platform implementation
  description;
- `pubspec.yaml`: new file adding package meta-data for the
  `webview_flutter_wkwebview` package.

* Direct copy of "iOS" folder.

A one to one copy of the `webview_flutter/ios` folder to
`webview_flutter_wkwebview/` using the following command:
```
cp -R ./webview_flutter/ios ./webview_flutter_wkwebview/
```

* Rename .podspec file to match package name.

For the Cocaopod package to be registered correctly the .podspec file
name needs to match the name of the Flutter package.

* Direct copy of WKWebView specific .dart files.

Copied the WKWebView specific .dart files over from the
`./webview_flutter` package.

* Modify .dart code to work with new platform_interface.

Make sure the `CupertinoWebView` widget extends the `WebViewPlatform`
class from the `webview_flutter_platform_interface` package correctly by
accepting an instance of the `JavascriptChannelRegistry` class.

* Direct copy of the `webview_flutter/example` app.

This commit makes a direct copy of the `webview_flutter/example` app to
the  `webview_flutter_wkwebview` package. After the copy the `example/android`
folder is removed as it doesn't serve a purpose in the WKWebView specific
package. Commands run where:
```
cp -R ./webview_flutter/example ./webview_flutter_wkwebview/
rm -rf ./webview_flutter_wkwebview/example/ios
```

* Update example to WKWebView specific implementation.

This commit updates the example App so it directly implements the
WKWebView specific implementation of the webview_flutter_platform_interface.

* Update integration tests.

Updated the existing integration tests (copied from webview_flutter
package) so they work correctly with the implementation of the
webview_flutter_wkwebview package.

Co-authored-by: BeMacized <bodhimulders@bemacized.net>

* Fix iOS UI tests.

This commit resolves failing UI tests and ensures the `Publishable` task
is green.

* Point to existing documentation URL

Update the documentation URL in the
`ios/webview_flutter_wkwebview.podspec` file to point to a valid
location. The `https://pub.dev/packages/webview_flutter_wkwebview`
package doesn't exists until this PR is published. However the `pod lib
lint` step in CI is failing if the URL doesn't exist yet.

* Split helper classes from main example widget.

Move the `WebView` and related `WebViewController` classes from the
main.dart into a separate web_view.dart file.

* Updated version numbers as suggested in review.

Updated the version of the plugin to the version of webview_flutter
package (2.0.13).

Also updated the Dart and Flutter versions to respectively 2.14.0 and
2.5.0.

Co-authored-by: BeMacized <bodhimulders@bemacized.net>
The new safety check doesn't allow simple platform-interface-only
changes because it doesn't actually check that a non-interface package
is actually modified before failing it for a modified platform
interface.

This fixes that, and adds a test case covering it.
Adds a check to `publish-check` that there is an AUTHORS file present,
since our license refers to "The Flutter Authors", so we want to have a
file distributed with each package that says who the AUTHORS are (vs.
just having a top-level repo AUTHORS file, which is not part of package
distribution).

Adds AUTHORS files to packages that have been created since the
earlier one-time fix that added them, but didn't add a check to prevent
future issues.

Also updates the publish-check failure tests to include checks for
specific output so that we know that they are failing for the reasons
the test is expecting, bringing them up to current repo standards for
failure tests.

Fixes flutter/flutter#89680
guille-ideotec and others added 3 commits December 22, 2021 12:01
PR flutter#4617 added a dependency on Dart auto-registration, but forgot to
bump the SDK requirement to 2.8 (where that feature was introduced for
Android). In order to fix older versions, this restores the previous
channel name so that the implementation here is compatible with the
default method channel registration used by Flutter 2.5 and earlier.

A follow-up will restore the package-specific channel name, but also
change the SDK requirement to >=2.8. This must be published first so
that the last published version that claims 2.5 compatibility actually
works with 2.5.

Fixes flutter/flutter#95706
@mavericksunny mavericksunny changed the base branch from caching to master December 29, 2021 05:46
@mavericksunny mavericksunny changed the base branch from master to caching December 29, 2021 06:07
@mavericksunny mavericksunny force-pushed the master branch 2 times, most recently from 22b5bd5 to d093a83 Compare June 3, 2022 04:44
@ywda
Copy link

ywda commented Jul 18, 2022

Encountered a problem

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-arm, locale zh-Hans-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.69.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.


Error: The method 'setMockMessageHandler'
isn't defined for the class 'BasicMessageChannel'.
FAILURE: Build failed with an exception.

@iosephmagno
Copy link

Is there any hope this pr will land in next 12 months? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet