Skip to main content

BBNativeRenderer

class BBNativeRenderer

A Utility class to create renderers

Functions

createJsonEmbedUrl

static func createJsonEmbedUrl(baseUrl: String, appIndicator: String, appId: String, contentIndicator: String? = nil, contentId: String? = nil) -> String

Create a json embed URL

  • Parameter baseUrl the base URL, e.g. "https://demo.bbvms.com"
  • Parameter appIndicator the application indicator, e.g. "r" for renderer
  • Parameter appId the application config id, e.g. the ad unit code
  • Parameter contentIndicator the content indicator (optional), reserved for future use
  • Parameter contentId the content id (optional), reserved for future use
  • Returns the json embed URL

createRendererView

static func createRendererView(uiViewController: UIViewController, frame: CGRect, jsonUrl: String, options: [String : Any]?) -> BBNativeRendererView

BBNativeRendererView Factory

Parameters:

NameDescription
frameThe size of the player
jsonUrlThe EMBED url the player will use to setup
optionsA dictionary with options to send to the player st creation. - 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 - "waitForCmp": Bool wait for Consent Management, then setup - "handleConsentManagement": Bool handle Consent Management -- needs waitForCmp - "tagForUnderAgeOfConsent": Bool - "consent_string": String default consent string - "consent_gdprApplies": Int default GDPR applies - "consent_cmpVersion": Int default CMP version - "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 - "forceFullscreenLandscape": Bool rotate the video to landscape when the video goes fullscreen - "adTagUrlParam_[key]": Any Custom parameters to add to ad tag URLs. Multiple parameters supported with different keys (e.g., "adTagUrlParam_userId": "12345")

Returns: BBNativeRendererView

createRendererView

static func createRendererView(uiViewController: UIViewController, frame: CGRect, jsonUrl: String) -> BBNativeRendererView

BBNativeRendererView Factory

Parameters:

NameDescription
frameThe size of the player
jsonUrlThe EMBED url the player will use to setup

Returns: BBNativeRendererView