Play audio & video

Play remote audio and video through the device's native player.

Play audio

Play a remote audio track in the native player.

const bdk = createBdkNative();

await bdk.media.playAudio({ url: "https://example.com/tracks/song.mp3" });

Pause and stop audio

Pause the current track or stop playback entirely.

await bdk.media.pauseAudio();
await bdk.media.stopAudio();

Play a video

Play a remote video in the native player. Pass muted: true to start playback muted.

await bdk.media.playVideo({ url: "https://example.com/clips/demo.mp4" });

Play a video playlist

Play a sequence of videos back to back. Pass muted: true to start playback muted.

iOS only — wrap the call in try/catch.

await bdk.media.playVideoPlaylist({
  videos: [
    "https://example.com/clips/one.mp4",
    "https://example.com/clips/two.mp4"
  ],
  muted: true
});