admel_webview_sdk 1.0.1 copy "admel_webview_sdk: ^1.0.1" to clipboard
admel_webview_sdk: ^1.0.1 copied to clipboard

AdMel WebView SDK - WebView integration for AdMel SDK with BGM ducking support for audio ad playback.

AdMel WebView SDK for Flutter #

WebView integration for AdMel SDK with automatic BGM ducking support.

When an audio ad plays, the SDK automatically lowers the volume of <audio> elements in your WebView and restores it when the ad finishes.

Installation #

dependencies:
  admel_webview_sdk: ^1.0.0

admel_sdk is included as a transitive dependency — no need to add it separately.

Quick Start #

import 'package:admel_sdk/admel_sdk.dart';
import 'package:admel_webview_sdk/admel_webview_sdk.dart';

// 1. Initialize AdMel SDK
final admelSdk = AdMelSdk();
await admelSdk.setMediaId('YOUR_MEDIA_ID');
await admelSdk.initialize(AdMelEnvironment.production);

// 2. Create WebView SDK (BGM ducking is enabled by default)
final webViewSdk = AdMelWebViewSdk(admelSdk: admelSdk);

// 3. Create a WebViewController with autoplay enabled
final controller = AdMelWebViewHelper.createController();
webViewSdk.setWebViewController(controller);

// 4. Load your web content
await controller.loadRequest(Uri.parse('https://your-game.example.com'));

// 5. Show ad — BGM ducking happens automatically
await admelSdk.showAd('YOUR_SLOT_ID', position: 'bottom-right');

BGM Ducking #

BGM ducking is enabled by default with volume 0.2 (20%).

// Customize ducking volume
webViewSdk.enableBgmDucking(volume: 0.3);

// Disable ducking
webViewSdk.disableBgmDucking();

// Manual BGM control (e.g., when navigating away)
webViewSdk.pauseBgm();
webViewSdk.resumeBgm();

License #

MIT

0
likes
130
points
147
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

AdMel WebView SDK - WebView integration for AdMel SDK with BGM ducking support for audio ad playback.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

admel_sdk, flutter, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on admel_webview_sdk