Player public events

Listen to events from player:

You can listen to player events through the Notification Centre. There are player events and ad events. Just change the string in notification.userInfo.

#import "ViewController.h"
#import <BridSDK/BridSDK.h>
@interface ViewController ()

@property (nonatomic) BVPlayer *player;


@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    player = [[BVPlayer alloc] initWithData:[[BVData alloc] initPlayerID:<int> forVideoID:<int>] forView:<UIView>]
    [self setupEventNetworking];

- (void)setupEventNetworking {   
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eventWriter:) name:@"PlayerEvent" object:nil];   
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eventWriter:) name:@"AdEvent" object:nil];    

- (void) eventWriter:(NSNotification *)notification {
    if ([ isEqualToString:@"PlayerEvent"]) {  
        [self logMessage:(NSString *)notification.userInfo[@"event"]]; 
    if ([ isEqualToString:@"AdEvent"]) { 
        [self logMessage:(NSString *)notification.userInfo[@"ad"]];  

import UIKit
import BridSDK

class ViewController: UIViewController {
    var player: BVPlayer?

    override func viewDidLoad() {
				player = BVPlayer(data: BVData(playerID: <Int32>, forVideoID: <Int32>), for: <UIView>)	
  func setupEventNetworking() {  
       NotificationCenter.default.addObserver(self, selector: #selector(eventWriter), name:NSNotification.Name(rawValue: "PlayerEvent"), object: nil) 
       NotificationCenter.default.addObserver(self, selector: #selector(eventWriter), name:NSNotification.Name(rawValue: "AdEvent"), object: nil) 
@objc func eventWriter(_ notification: NSNotification) {       
    if == "PlayerEvent" {
        print(notification.userInfo?["event"] as! String)
    if == "AdEvent" {   
        print(notification.userInfo?["ad"] as! String)


Available player events:

sec (player time in seconds)
Play (player play video)
Pause (player pause video)
Stop (player stop video)
Next (player next video)
Previous (player previous video)
PlayerInitialized (player is initialised)
SetupVideo (video is initialised)
MuteVideo (video is muted)
UnMuteVideo (video is unmuted)
VideoEnded (video is ended)

Available player advertising events:

adLoaded (parser loaded ad)
adStarted (ad video started)
adFirstQuartile (ad first quartile)
adMidpoint (ad midpoint)
adThird Quartile (ad third quartile)
adComplete (ad complete)
adError (ad return error)
adSkipped (ad skipped)
adPaused (ad paused)
adResume (ad resume)
adTapped (ad tapped)