- Introduction to Data
- Track your video performance
- HTML5 video element
- HLS.js
- AVPlayer
- ExoPlayer
- Dash.js
- Video.js
- React native video
- Kaltura (android)
- Kaltura (iOS)
- Kaltura (web)
- JW Player (web)
- JW Player (iOS)
- Android MediaPlayer
- Bitmovin player
- Akamai media player
- NexPlayer
- Ooyala player
- Shaka player
- Azure media player
- THEOplayer (web)
- THEOplayer (iOS)
- Flowplayer
- Brightcove (web)
- Brightcove (iOS)
- Brightcove (android)
- CTS PDK
- Chromecast
- Roku
- Samsung (Tizen)
- LG
- Agnoplay player
- Make API requests
- Setup alerts
- Make your data actionable with metadata
- Track autoplaying videos
- Extend Data with custom metadata
- Track CDN for request metrics
- See how many people are watching
- Build a custom integration
- Understand metric definitions
- Export raw video view data
- Ensure privacy compliance
- Mux Data FAQs
Monitor Brightcove (iOS)
This guide walks through integration with Brightcove iOS player to collect video performance metrics with Mux Data.
In this guide:
Brightcove's native SDK for iOS is based on AVPlayerLayer
. You will need to be using Brightcove's iOS player version 6.x
.
pod 'Mux-Stats-AVPlayer', '~>2.0'
This will install Mux-Stats-AVPlayer
and the latest current release of our core Objective-C Library. There will be no breaking updates in major versions, so you can safely run pod update
for future versions.
Next, add correct import statement into your application.
Get your ENV_KEY
from the Mux environments dashboard.
Env Key is different than your API token
ENV_KEY
is a client-side key used for Mux Data monitoring. These are not to be confused with API tokens which are created in the admin settings dashboard and meant to access the Mux API from a trusted server.
In your application, you will need to hook into Brightcove's SDK lifecycle events in order to access the underlying AVPlayerLayer
instance.
@import BrightcovePlayerSDK; @import MUXSDKStats; @property (nonatomic, copy) NSString *trackedPlayerName; - (void)playbackController:(id<BCOVPlaybackController>)controller didAdvanceToPlaybackSession:(id<BCOVPlaybackSession>)session { // Destroy previous MUXSDKStats if this signifies the other view ended // Note: you may want to handle this in another lifecycle event, if you // have one that signifies when the video playback has ended/exited. if (self.trackedPlayerName != nil) { [MUXSDKStats destroyPlayer:self.trackedPlayerName]; } MUXSDKCustomerPlayerData *playerData = [[MUXSDKCustomerPlayerData alloc] initWithEnvironmentKey:@"ENV_KEY"]; [playerData setPlayerName: @"Brightcove SDK w/ Mux"]; // set additional player metadata here MUXSDKCustomerVideoData *videoData = [MUXSDKCustomerVideoData new]; [videoData setVideoId:@"EXAMPLE ID"]; // set additional video metadata here self.trackedPlayerName = @"example_player_name"; [MUXSDKStats monitorAVPlayerLayer:session.playerLayer withPlayerName:self.trackedPlayerName playerData:playerData videoData:videoData]; }
Refer to the detailed guide for AVPlayer to finish setup.