BBNativePlayer
public class BBNativePlayer
A Utility class to create players
-
Creates a BBNativePlayerView
- Options:
- “adsystem_ppid”: String used to fill the ppid for google IMA
- “adsystem_buid”: String used for adsystem macro replacement
- “adsystem_rdid”: String used for adsystem macro replacement
- “adsystem_idtype”: String used for adsystem macro replacement
- “adsystem_is_lat”: Bool used for adsystem macro replacement
- “noStats”: Bool disables statistics logging when true, overrides playout setting
- “commercials”: Bool allow commercials, overrides playout setting
- “allowCollapseExpand”: Bool honour collapse / expand requests
- “autoPlay”: Bool auto play, overrides playout setting
- “noChromeCast”: Bool disables chromeCast functionality when true, overrides playout setting castButton
“showChromeCastMiniControlsInPlayer”: Bool (default false) Shows the ChromeCast MiniControls in the player when needed
Declaration
Swift
public static func createPlayerView(uiViewController: UIViewController, frame: CGRect, jsonUrl: String, options: [String : Any]?) -> BBNativePlayerView
Parameters
frame
The size of the player
jsonUrl
The EMBED url the player will use to setup
options
A dictionary with options to send to the player st creation.
Return Value
BBNativePlayerView
-
Creates a BBNativePlayerView
Declaration
Swift
public static func createPlayerView(uiViewController: UIViewController, frame: CGRect, jsonUrl: String) -> BBNativePlayerView
Parameters
frame
The size of the player
jsonUrl
The EMBED url the player will use to setup
Return Value
BBNativePlayerView
-
Creates a BBNativePlayerView and presents it as a full screen modal
- Options:
- “adsystem_ppid”: String used to fill the ppid for google IMA
- “adsystem_buid”: String used for adsystem macro replacement
- “adsystem_rdid”: String used for adsystem macro replacement
- “adsystem_idtype”: String used for adsystem macro replacement
- “adsystem_is_lat”: Bool used for adsystem macro replacement
- “noStats”: Bool disables statistics logging when true, overrides playout setting
- “commercials”: Bool allow commercials, overrides playout setting
- “allowCollapseExpand”: Bool honour collapse / expand requests
- “autoPlay”: Bool auto play, overrides playout setting
- “noChromeCast”: Bool disables chromeCast functionality when true, overrides playout setting castButton
“showChromeCastMiniControlsInPlayer”: Bool (default false) Shows the ChromeCast MiniControls in the player when needed
Declaration
Swift
public static func createModalPlayerView(uiViewContoller: UIViewController, jsonUrl: String, options: [String : Any]?) -> BBNativePlayerView
Parameters
uiViewContoller
UIViewController - is used to present the modal player
jsonUrl
The EMBED url the player will use to setup
options
A dictionary with options to send to the player st creation.
Return Value
none
-
Creates a BBNativePlayerView and presents it as a full screen modal
Declaration
Swift
public static func createModalPlayerView(uiViewContoller: UIViewController, jsonUrl: String) -> BBNativePlayerView
Parameters
uiViewContoller
UIViewController - is used to present the modal player
jsonUrl
The EMBED url the player will use to setup
Return Value
none
-
Create a json embed URL
Declaration
Swift
public static func createJsonEmbedUrl(baseUrl: String, appIndicator: String, appId: String, contentIndicator: String? = nil, contentId: String? = nil) -> String