Storyteller Brightcove Integration#
This package is a utility to record player events from an AVPlayer and feed them into Brightcove analytics.
Setup#
Add Storyteller Brightcove Collector using SPM:
- Add the package dependency:
https://github.com/getstoryteller/storyteller-brightcove-collector-swift - Add the
StorytellerBrightcoveIntegrationtarget to your app target
To use the module, StorytellerSDK needs to be set to version 11.0.0 or higher.
In the file where you setup the Storyteller SDK, import the added package, set up the module and set it on the Storyteller class:
import StorytellerBrightcoveIntegration
func initializeStoryteller() {
let brightcoveConfiguration = StorytellerBrightcoveModuleConfiguration(
account: "<account ID>",
playerName: "Video Player", // optional
source: "<source>",
destination: "<destination>"
)
Storyteller.shared.modules.append(StorytellerBrightcoveModule(configuration: brightcoveConfiguration))
// other Storyteller initialization code
}
Code sample is also available in the Showcase App.