iOS SDK API Reference

Brid SDK playback methods

๐Ÿ“˜

Call methods

You must first initialise your player, and then call methods. You can also call on specified event.

play

Set player to play video content

[self.player play];
player.play()

pause

Set player to pause video content

[self.player pause];
player.pause()

mute

Set player to mute

[self.player mute];
player.mute()

unmute

Set player to unmute

[self.player unmute];
player.unmute()

next

Call next video from playlist

[self.player next];
player.next()

previous

Call previous video from playlist

[self.player previous];
player.previous()

stop

Player stop video

[self.player stop];
player.stop()

Brid SDK getter methods

isFullscreen

Check if player is in fullscreen, return type boolean

[self.player isFullscreen];
player.isFullscreen()

isPlayerInView

Check if player is first in view on screen, return type boolean

[self.player isPlayerInView];

๐Ÿ“˜

Information

If 1px (pixel) view is in front of Brid Player, mothod isPlayerInView will return false

getCurrentTime

Return current time of video, return type double

[self.player getCurrentTime];
player.getCurrentTime()

getDuration

Return duration of video, return type double

[self.player getDuration];
player.getDuration()

getMuted

Check is player muted, return type double

[self.player getMuted];
player.getMuted()

getVolume

Check current player volume, return type float

[self.player getVolume];
player.getVolume()

isAdInProgress

Check if ad is in progress, return type boolean

[self.player isAdInProgress];
player.isAdInProgress()

getCurrentIndex

Get current video index from playlist, return type boolean NSInteger

[self.player getCurrentIndex];
player.getCurrentIndex()

getPlaylist

Get current playlist, return type array of Brid VideoData object

[self.player getPlaylist];
player.getPlaylist()

getSource

Get current video url, return type NSString

[self.player getSource];
player.getSource()

getVideo

Get current video object, return type Brid VideoData object

[self.player getVideo];
player.getVideo()

Brid SDK setters methods

setVolume

Set volume on player, setter type float. Float number for volume is from 0.0 to 1.0

[self.player setVolume:float];
player.setVolum(float)

playByIndex

Play video content by index in playlist, setter type NSInteger

[self.player playByIndex: Int];
player.play(by: Int)

setVideo

Set custom video object.

[self.player setVideo:<video: VideoData>];
player.setVideo(<video: VideoData>)

๐Ÿ“˜

Creating video object

setVideoUrl

Set custom video from url

[self.player setVideoUrl:<url: String>];
player.setVideoUrl(<url: String>)

setPlaylist

Set external JSON

[self.player setPlaylist:<url: URL>];
player.setPlaylist(<url: URL>)

setFullscreenON

Set player to fullscreen. This method will only trigger once per init of player instance.

[self.player setFullscreenON];
player.setFullscreenON()

setFullscreenOFF

Set player to view. This method will only trigger once per init of player instance.

[self.player setFullscreenOFF];
player.setFullscreenOFF()

autoFullscreen

Set auto fullscreen when devices rotate. Auto rotate is always enabled.

[self.player autoFullscreenWhenRotating:NO];
player.autoFullscreen(whenRotating: false)

Custom UI

Set custom image for buttons on player

//Image for init button
[self.player setCustomInitButton:(UIImage *)image];

//Image for progress bar color
[self.player setProgressbarColor:(UIColor *_Nullable)color background:(UIColor * _Nullable)backgroundColor];

 //Image for custom button for Play/Pause/Replay
[self.player setCustomButtonPlay:(UIImage *)play pause:(UIImage *)pause replay:(UIImage *)replay];

//Image for custom button for Mute/Unmute
[self.player setCustomImageMute:(UIImage *_Nullable)mute unmute:(UIImage *_Nullable)unmute];

//Image for custom button for Next/Previous
[self.player setCustomImageNext:(UIImage *_Nullable)next previous:(UIImage *_Nullable)previous];

//Image for custom button for Share
[self.player setCustomImageShare:(UIImage *_Nullable)share];

//Image for custom button for Playlist
[self.player setCustomImagePlaylist:(UIImage *_Nullable)playlist];

//Image for custom button for Cogwheel
[self.player setCustomImageCogwheel:(UIImage *_Nullable)cogwheel];

//Image for custom button for Caption Open/Close
[self.player setCustomCaptionsImageOpen:(UIImage *_Nullable)open close:(UIImage *_Nullable)close];

//Image for custom button for Fullscreen
[self.player setCustomImageFullscreen:(UIImage *_Nullable)fullscreen];

//Image for custom button for all customizable UI elements
[self.player setCustomSkin:(UIImage *_Nullable)initButton
                      play:(UIImage *_Nullable)play
                     pause:(UIImage *_Nullable)pause
                    replay:(UIImage *_Nullable)replay
                      mute:(UIImage *_Nullable)mute
                    unmute:(UIImage *_Nullable)unmute
                      next:(UIImage *_Nullable)next
                  previous:(UIImage *_Nullable)previous
                     share:(UIImage *_Nullable)share
                  playlist:(UIImage *_Nullable)playlist
                   cogweel:(UIImage *_Nullable)cogwheel
               captionOpen:(UIImage *_Nullable)captionOpen
              captionClose:(UIImage *_Nullable)captionClose
                fullscreen:(UIImage *_Nullable)fullscreen];
//Image for init button
player.setCustomInitButton(UIImage?)

//Image for progress bar color
player.setProgressbarColorsetProgressbarColor(<#T##color: UIColor?##UIColor?#>, background: <#T##UIColor?#>)

 //Image for custom button for Play/Pause/Replay
player.setCustomButtonPlay(<#T##play: UIImage?##UIImage?#>, pause: <#T##UIImage?#>, replay: <#T##UIImage?#>)

//Image for custom button for Mute/Unmute
player.setCustomImageMute(<#T##mute: UIImage?##UIImage?#>, unmute: <#T##UIImage?#>)

//Image for custom button for Next/Previous
player.setCustomImageNext(<#T##next: UIImage?##UIImage?#>, previous: <#T##UIImage?#>)

//Image for custom button for Share
player.setCustomImageShare(<#T##share: UIImage?##UIImage?#>)

//Image for custom button for Playlist
player.setCustomImagePlaylist(<#T##playlist: UIImage?##UIImage?#>)

//Image for custom button for Cogwheel
player.setCustomImageCogwheel(<#T##cogwheel: UIImage?##UIImage?#>)

//Image for custom button for Caption Open/Close
player.setCustomCaptionsImageOpen(<#T##open: UIImage?##UIImage?#>, close: <#T##UIImage?#>)

//Image for custom button for Fullscreen
player.setCustomImageFullscreen(<#T##fullscreen: UIImage?##UIImage?#>)

//Image for custom button for all customizable UI elements
 player.setCustomSkin(<#T##initButton: UIImage?##UIImage?#>, 
                          	     play: <#T##UIImage?#>,
                      			pause: <#T##UIImage?#>, 
                               replay: <#T##UIImage?#>,
                                 mute: <#T##UIImage?#>,
                               unmute: <#T##UIImage?#>,
                                 next: <#T##UIImage?#>,
                             previous: <#T##UIImage?#>,
                                share: <#T##UIImage?#>,
                             playlist: <#T##UIImage?#>,
                              cogweel: <#T##UIImage?#>,
                          captionOpen: <#T##UIImage?#>,
                         captionClose: <#T##UIImage?#>,
                           fullscreen: <#T##UIImage?#>)