BiddingStack Audio Player Flutter Integration Guide
Play BiddingStack audio in your Flutter app with a typed controller for playback control, runtime configuration, player events, media session integration, and an optional fullscreen player.
| Component | Minimum Version |
|---|---|
| Flutter | 3.16+ |
| Dart | 3.4+ |
| iOS | 14.0+ |
| Android API Level | 24 (Android 7.0)+ |
The biddingstack_media_sdk package is distributed privately while in early access. Contact the BiddingStack team to get the SDK package.
Platform setup:
<uses-permission android:name="android.permission.INTERNET" /> is declared in android/app/src/main/AndroidManifest.xml. Flutter's default template only declares it for debug and profile builds.audio background mode to ios/Runner/Info.plist:<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
Give the widget an explicit height; use onResize to track the player's content height:
import 'package:biddingstack_media_sdk/biddingstack_media_sdk.dart';
final controller = BiddingStackPlayerController(
onEvent: (event) => debugPrint(event.toString()),
);
SizedBox(
height: 280,
child: BiddingStackPlayer(controller: controller),
)
Widget parameters:
| Parameter | Default | Description |
|---|---|---|
controller | required | The BiddingStackPlayerController driving this player |
mediaSessionEnabled | true | Lock screen / media controls integration |
verbose | false | Verbose logging |
enableExternalLinkOpen | true | Open external links from the player |
Controller callbacks:
| Callback | Description |
|---|---|
onEvent(PlayerEvent event) | Player events |
onResize(double heightDp) | Player content height changed |
onExternalLinkOpened(Uri uri) | An external link was opened |
await controller.load(const PlayerSettings(
playerConfig: PlayerConfig(autoPlay: false, themeid: 1),
audio: [
AudioItem(
audioUrl: 'https://example.com/track.mp3',
audioTitle: 'My Track',
),
],
));
PlayerConfig mirrors the web player configuration. mode is managed by the SDK and set to embed automatically.
@override
void dispose() {
controller.destroy();
super.dispose();
}
All controller methods return Future<void>; failures surface as BiddingStackPlayerException:
| Method | Description |
|---|---|
load(PlayerSettings settings) | Load settings and audio |
play() / pause() | Start / pause playback |
seek(double seconds) | Seek to a position in seconds |
next() / prev() | Switch tracks in a playlist |
setPlaybackRate(double rate) | Set playback speed |
setVolume(double volume) | Set volume, 0.0–1.0 |
setMuted(bool muted) | Mute / unmute |
destroy() | Tear down the player |
Note: Commands issued before the platform view attaches are queued and flushed automatically.
Present a fullscreen audio player; the returned future completes when it is dismissed:
await BiddingStackMedia.presentFullscreenPlayer(
settings,
onEvent: (event) => debugPrint(event.type.toString()),
);
mode is set to fullscreen automatically.