admel_sdk

AdMel SDK for Flutter — Audio advertisement plugin with banner display, VAST support, mute detection, and auto-refresh.

Features

  • Audio ad playback with VAST protocol support
  • Banner ad display with customizable appearance
  • Mute detection and visual banner fallback
  • Auto-refresh for continuous ad rotation
  • Playback controls (pause, resume, stop)
  • Volume control

Getting Started

Installation

Add admel_sdk to your pubspec.yaml:

dependencies:
  admel_sdk: ^1.0.1

Platform Requirements

  • iOS: 12.0+
  • Android: API 21+

Usage

import 'package:admel_sdk/admel_sdk.dart';

final admel = AdmelSdk();

// Initialize with slot and media IDs
await admel.initializePlugin(
  slotid: 'your-slot-id',
  mediaid: 'your-media-id',
  position: 'bottom-right',  // Banner position
);

// Playback controls
await admel.pause();
await admel.resume();
await admel.stopAudioAndHideBanner();

// Status
bool playing = await admel.isPlaying();
double progress = await admel.getProgress();

// Volume
await admel.setVolume(0.8);

// Auto-refresh
await admel.setAutoRefresh(enabled: true, interval: 30);
await admel.initializePlugin(
  slotid: 'your-slot-id',
  mediaid: 'your-media-id',
  backgroundColor: '#FFFFFF',
  textColor: '#333333',
  textSize: 14.0,
  fontFamily: 'Helvetica',
  buttonColor: '#007AFF',
  borderColor: '#CCCCCC',
  position: 'bottom-right',
  offsetX: 10.0,
  offsetY: 10.0,
);

License

MIT License. See LICENSE for details.