{"slug": "brightcove", "page_title": "Use Brightcove", "page_url": "Brightcove/", "canonical_url": "/ios/Brightcove/", "markdown": "# Storyteller Brightcove Integration\n\nThis package is a utility to record player events from an `AVPlayer` and feed them into Brightcove analytics.\n\n## Setup\n\nAdd Storyteller Brightcove Collector using SPM:\n\n1. Add the package dependency: `https://github.com/getstoryteller/storyteller-brightcove-collector-swift`\n1. Add the `StorytellerBrightcoveIntegration` target to your app target\n\nTo use the module, StorytellerSDK needs to be set to version `11.0.0` or higher.\n\nIn the file where you setup the Storyteller SDK, import the added package, set up the module and set it on the `Storyteller` class:\n\n<!-- storyteller-swift-example: id=brightcove-01 target=brightcove-ios context=declarations -->\n\n```swift\nimport StorytellerBrightcoveIntegration\n\nfunc initializeStoryteller() {\n let brightcoveConfiguration = StorytellerBrightcoveModuleConfiguration(\n account: \"<account ID>\",\n playerName: \"Video Player\", // optional\n source: \"<source>\",\n destination: \"<destination>\"\n )\n\n Storyteller.shared.modules.append(StorytellerBrightcoveModule(configuration: brightcoveConfiguration))\n\n // other Storyteller initialization code\n}\n```\n\nSee the Brightcove module setup example in the Showcase app: [`AppDelegate.setupStoryteller`](https://github.com/getstoryteller/storyteller-showcase-ios/blob/11.6.1/main/ShowcaseApp/ShowcaseApp.swift#L95).\n", "copy_markdown_include_header": false, "base_path": "", "ai_dir": "ai", "missing_payload_behavior": "empty"}