Audio Only with the Native SDKs

In this topic, you will learn how to work with audio-only playback with the Brightcove Native SDKs.

Introduction

Audio-only streams allow you to tap into the sizable audio entertainment ecosystem, including podcasts and radio. With Brightcove, you can ingest and live stream audio-specific content without a video component. Brightcove's player technology has been optimized for audio to mobile, web, and connected home devices. You will even get relevant analytics for audio-only playback.

Here is an example of a poster image displayed for audio-only content.

Audio only with poster image
Audio only with poster image

The Native SDKs support audio-only content playback. You can customize the player view as follows:

  • Display a poster image for the duration of playback
  • Keep controls visible at all times
  • Use a compact playback view

Audio-only playback is supported for both VOD and Live streams.

Requirements

The following requirements are needed for this feature:

  • Native SDK for Android 8.0.0 and newer
  • Native SDK for iOS 6.10.3 and newer

Android Implementation

The Native SDK for Android supports playback of audio-only content along with audio-only video views.

  1. In your application's build.gradle file, include the following dependency using version 8.0.0 or newer:

    implementation('com.brightcove.player:exoplayer2:8.0.0')
  2. You can now play audio-only assets using the Brightcove APIs you are already familiar with and explained in the Android: Working with Media Content document.

    For example, you may extend the BrightcovePlayer or BrightcovePlayerActivity in your Activity class and load a playlist:

    BrightcoveExoPlayerVideoView player = findViewById(R.id.player_view);
    Catalog catalog = new Catalog.Builder(player.getEventEmitter(), ACCOUNT_ID)
        .setBaseURL(YOUR_BASE_URL)
        .setPolicy(POLICY_ID)
        .build();
    catalog.findPlaylistByReferenceID(PLAYLIST_REFERENCE_ID, new PlaylistListener() {
        @Override
        public void onPlaylist(Playlist playlist) {
            player.addAll(playlist.getVideos());
        }
    });

For details, see the following:

iOS Implementation

The Native SDK for iOS supports audio-only content playback and provides a few audio-only features.

For details, see the following: