Skip to content

Add more control on inline video playback#33

Merged
didarul-codes merged 2 commits intodevelopfrom
feature/add-stoploading-method-in-controller
Sep 16, 2025
Merged

Add more control on inline video playback#33
didarul-codes merged 2 commits intodevelopfrom
feature/add-stoploading-method-in-controller

Conversation

@didarul-codes
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings September 16, 2025 07:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds more control over inline video playback by enabling platform-specific configurations for video handling in webviews. The changes update dependencies, enable inline media playback on iOS, and add better video control options.

  • Updated webview dependencies to newer versions with additional platform-specific packages
  • Added platform-specific webview controller creation with inline media playback support
  • Implemented a new stopLoading() method for better webview control

Reviewed Changes

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

Show a summary per file
File Description
pubspec.yaml Updated package versions and added platform-specific webview dependencies
.fvmrc Updated Flutter version to 3.32.8
lib/src/adblocker_webview_controller.dart Added stopLoading method interface
lib/src/adblocker_webview_controller_impl.dart Implemented stopLoading method and added platform imports
lib/src/adblocker_webview.dart Added platform-specific webview configuration with inline media playback support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +192 to +198
if (WebViewPlatform.instance is WebKitWebViewPlatform) {
final WebKitNavigationDelegate webKitDelegate =
navigationDelegate.platform as WebKitNavigationDelegate;
} else if (WebViewPlatform.instance is AndroidWebViewPlatform) {
final AndroidNavigationDelegate androidDelegate =
navigationDelegate.platform as AndroidNavigationDelegate;
}
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

The platform-specific navigation delegates are created but never used. Either utilize these delegates for platform-specific configuration or remove the unused variable assignments.

Suggested change
if (WebViewPlatform.instance is WebKitWebViewPlatform) {
final WebKitNavigationDelegate webKitDelegate =
navigationDelegate.platform as WebKitNavigationDelegate;
} else if (WebViewPlatform.instance is AndroidWebViewPlatform) {
final AndroidNavigationDelegate androidDelegate =
navigationDelegate.platform as AndroidNavigationDelegate;
}
// Platform-specific navigation delegates can be configured here if needed.

Copilot uses AI. Check for mistakes.
}

_webViewController = WebViewController.fromPlatformCreationParams(params);
// ···
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

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

The comment '// ···' is unclear and doesn't provide meaningful information about the code that follows. Replace with a descriptive comment explaining the platform-specific configuration setup.

Suggested change
// ···
// Perform Android-specific WebView configuration: enable debugging and require user gesture for media playback.

Copilot uses AI. Check for mistakes.
@didarul-codes didarul-codes merged commit e662555 into develop Sep 16, 2025
1 check failed
@didarul-codes didarul-codes deleted the feature/add-stoploading-method-in-controller branch September 16, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants