Skip to content
master
Go to file
Code

README.md

Brightcove Player SDK for iOS Samples

Learn more about the Brightcove Native Player SDKs.

ios-player-samples.git is a collection of sample applications for the Brightcove Player SDKs for iOS and tvOS, organized by subject area. An installation of CocoaPods 1.0.0 or higher is required to download the sample dependencies.

Prerequisites

  1. CocoaPods 1.0+
  2. Xcode 11.0+
  3. iOS 11.0+ or tvOS 11.0+

An Apple Developer Program account is required to run any sample app on a physical device. In order to provision your device, edit the sample app bundle identifier to make it unique to your organization.

About CocoaPods

To ensure you are using the latest releases of the Brightcove software components, update your Podspec repository before building any of the sample applications by running the following on the command line:

pod repo update

About Swift

The Swift sample apps are written in Swift language version 4.2.

Instructions

Unless otherwise instructed, samples can be run by following these steps:

  1. From the project directory, run pod install.
  2. Open the corresponding .xcworkspace file.
  3. Where the Podfile's pod directives do not specify that a dynamic framework is being installed, there is some additional setup required to build and run the project:
    • Locate the bcovpuiiconfont.ttf file in the Pods/Brightcove-Player-SDK/ios/BrightcovePlayerSDK.framework folder.
    • Add this file to your Xcode project listing so that the font file is copied into the app bundle.
    • In the built app's bundle, the font file should end up at the same level as the app's Info.plist file.
    • The font file supplies some of the BrightcovePlayerUI interface elements, but it does not need to be listed in the plist itself.
  4. There are README.md files in several of the samples that provide additional setup steps that are specific to those examples.

Note: If you intend to use these samples offline, be sure to run Cocoapods before going offline in order to download the required dependencies.

Samples

FairPlay

FairPlay samples demonstrate how to play protected videos using FairPlay plugin that is integrated into the core BrightcovePlayerSDK framework.

FairPlayIMAPlayer

To see an example of using FairPlay with Google Interactive Media Ads (IMA), refer to the FairPlayIMAPlayer sample app in the IMA folder.

A note about the FairPlay sample apps

In both of the FairPlay sample apps, there are references to FairPlayPublisherId and FairPlayApplicationId. These terms refer to FairPlay credentials that Brightcove does not provide, which are instead acquired through Apple directly.

iOS does not allow FairPlay-protected video to display in a simulator so it's important to develop on an actual device.

FreeWheel

FreeWheel samples demonstrate how to play ads managed by FreeWheel. These are intended to cover the basic configuration to retrieve linear and companion ads.

GoogleCast

GoogleCast samples demonstrate how to extend your app to direct its streaming video to a Chromecast device using the Google Cast plugin. The BasicCastPlayer app is intended to cover use of a custom cast manager and BCOVGoogleCastManager. The BrightcoveCastReceiver app supports more features such DRM protected videos, SSAI and HLSv3 or superior.

IMA

IMA samples demonstrate how to play ads managed by Google Interactive Media Ads (IMA). These are intended to cover use cases like VMAP, VAST, Server Side Ad rules, and advanced ad topics.

Offline

Offline samples demonstrate downloading offline-enabled HLS videos and playing them back with or without a network connection.

iOS does not allow video downloads to a simulator so it's important to develop on an actual device.

Omniture

Omniture sample demonstrates how to track analytics using the Omniture plugin.

Player

Player samples demonstrate how to use the core SDK. These are intended to cover use cases like custom controls, analytics, and playback.

PlayerUI

PlayerUI samples demonstrate how to customize the player look and feel. These are intended to cover the modification of the BCOVPlayerUI, the customization of VoiceOver properties for accessibility and the use of the view strategy.

Pulse

Pulse samples demonstrate how to play ads managed by INVIDI Technologies Pulse. These are intended to cover different configurations for the content.

SidecarSubtitles

SidecarSubtitles sample demonstrates how to add WebVTT subtitles to an HLS manifest from within an iOS/tvOS app using SidecarSubtitles plugin that is integrated into the core BrightcovePlayerSDK framework.

SSAI

SSAI samples demonstrate how to use the SSAI plugin. These are intended to cover playback of Dynamic Delivery with or without Server-Side Ad Insertion, and play pre-rolls using Google IMA for SSAI Live Streams.

Feature Highlights

  • An example of creating a BCOVPlaybackSessionConsumer can be found in the OfflinePlayer and CustomControls sample apps.
  • Picture-in-Picture functionality can be found in the VideoCloudBasicPlayer sample app.
  • An example of setting up lock screen playback controls can be found in the VideoCloudBasicPlayer sample app.
  • An example of creation a BCOVPlaybackController using a view strategy can be found in the PlayerUI section.
You can’t perform that action at this time.