The Blue Billywig Native Player SDK lets you embed native video playback directly inside your iOS or Android app.
1.0 | What is it?
The Native Player SDK provides a lightweight, hardware-accelerated video player for iOS and Android. It connects directly to your Blue Billywig publication and supports clips, playlists, and project embeds: the same content you publish on the web, now available in your native app.
The SDK has three main structures: the BBNativePlayer class (factory for creating player views), the BBNativePlayerView class (the UI view with playback controls), and the BBNativePlayerViewDelegate interface (for responding to player events).
New features developed for the web player are also developed for the native SDKs. Both iOS and Android are continuously updated.
2.0 | Features
- Native hardware-accelerated playback
- Support for clips, playlists, and project embeds
- Chromecast support (iOS and Android)
- AirPlay and Picture-in-Picture support (iOS)
- Outstream and Shorts playback
- Playback event callbacks (play, pause, and more)
- Full ad support (VAST, VPAID, Google IMA)
3.0 | Getting started
The player is created via BBNativePlayer.createPlayerView() using a JSON embed URL. The JSON URL is the standard Blue Billywig embed URL with a .json extension, for example:
https://yourpublication.bbvms.com/p/default/c/1234567.json3.1 | Android
The SDK is distributed via Maven Central. Add the dependency to your app-level build.gradle.kts:
dependencies {
implementation("com.bluebillywig.bbnativeplayersdk:bbnativeplayersdk:8.40.0")
}A minimal implementation in Kotlin:
import com.bluebillywig.bbnativeplayersdk.BBNativePlayer
import com.bluebillywig.bbnativeplayersdk.BBNativePlayerView
class MainActivity : AppCompatActivity() {
private lateinit var playerContainer: LinearLayout
private var playerView: BBNativePlayerView? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
playerContainer = findViewById<LinearLayout>(R.id.player_container)
playerView = BBNativePlayer.createPlayerView(
this,
"https://yourpublication.bbvms.com/p/default/c/1234567.json"
)
playerContainer.addView(playerView)
}
}Add the required permissions to AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />For the full Android setup guide, visit the Android Getting Started guide.
3.2 | iOS
The SDK (BBNativePlayerKit) is available via CocoaPods or Swift Package Manager.
Swift Package Manager: in Xcode, go to File > Add Packages and enter the repository URL https://github.com/bluebillywig/bbnativeplayerkit-cocoapod. Use the Exact Version rule: the SDK does not strictly follow Semantic Versioning.
CocoaPods: add the following to your Podfile:
platform :ios, '12.0'
target 'YourApp' do
pod 'BlueBillywigNativePlayerKit-iOS', '~>7.98'
pod 'BlueBillywigNativePlayerKit-iOS/GoogleCastSDK'
endThen run pod install --repo-update.
A minimal Swift implementation:
import UIKit
import BBNativePlayerKit
import bbnativeshared
class ViewController: UIViewController {
private var bbPlayerView: BBNativePlayerView? = nil
override func viewDidLoad() {
super.viewDidLoad()
bbPlayerView = BBNativePlayer.createPlayerView(
uiViewController: self,
frame: view.frame,
jsonUrl: "https://yourpublication.bbvms.com/p/default/c/1234567.json"
)
view.addSubview(bbPlayerView!)
bbPlayerView?.translatesAutoresizingMaskIntoConstraints = false
bbPlayerView?.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor).isActive = true
bbPlayerView?.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor).isActive = true
bbPlayerView?.widthAnchor.constraint(equalTo: view.safeAreaLayoutGuide.widthAnchor).isActive = true
bbPlayerView?.heightAnchor.constraint(equalToConstant: view.safeAreaLayoutGuide.layoutFrame.width * 9/16).isActive = true
}
}For the full iOS setup guide, visit the iOS Getting Started guide.
4.0 | System requirements
4.1 | Android
- Android API 21+
- Kotlin or Java
4.2 | iOS
- iOS 12.0+
- Xcode 14.3.1+
- Swift or Objective-C
5.0 | Also available for React Native
If you are building a React Native app, the React Native Player SDK provides the same native playback in a cross-platform package: one codebase for both iOS and Android.
6.0 | Looking for a complete video experience?
If you want to embed a full branded video portal with swim lanes, carousels, search, and detail pages, the Channels SDK builds on top of the Native Player SDK and gives you a turnkey streaming experience inside your app. It is available for all three mobile platforms:
- Jetpack Compose (Android): Jetpack Compose Channels SDK
- SwiftUI (iOS): SwiftUI Channels SDK
- React Native: React Native Channels SDK or React Native Player SDK for standalone playback