BBNativeShorts
class BBNativeShorts
BBNativeShorts offers static factory functions for creating the views that do the actual work
Functions
createShortsView
fun createShortsView(context: Context, jsonUrl: String?, options: Map<String, Any?>? = null) : BBNativeShortsView
Create a Shorts view
- context: any host whose context chain leads to a FragmentActivity (AppCompatActivity also works — it's a FragmentActivity). The SDK walks the ContextWrapper chain, so a ContextThemeWrapper around an activity is fine. Required for the fullscreen and settings-sheet features.
- jsonUrl: the json embed URL (nullable)
- options: the options dictionary (optional), options recognized:
- displayFormat: full | list | player
- shelfStartSpacing: Int - spacing at the start of the shorts list
- shelfEndSpacing: Int - spacing at the end of the shorts list
Parameters:
| Name | Description |
|---|---|
context | the view context |
jsonUrl | the json embed URL (nullable) |
options | the options dictionary (optional) |
Returns: the Shorts view
createJsonEmbedUrl
fun createJsonEmbedUrl(baseUrl: String, appIndicator: String, appId: String, contentIndicator: String? = null, contentId: String? = null) : String
Create a json embed URL
- baseUrl: the base URL, e.g. "https://demo.bbvms.com"
- appIndicator: the application indicator, e.g. "p" for player
- appId: the application config id, e.g. the playout code
- contentIndicator: the content indicator (optional), e.g. "c" for clip
- contentId: the content id, e.g. "7654321"
Parameters:
| Name | Description |
|---|---|
baseUrl | the base URL, e.g. "https://demo.bbvms.com" |
appIndicator | the application indicator, e.g. "sh" for shorts experience |
appId | the application config id, e.g. the shorts experience id |
contentIndicator | the content indicator (optional), e.g. "l" for list |
contentId | the content id, e.g. "7654321" |
Returns: the json embed URL