Skip to content

Instantly share code, notes, and snippets.

Instructions

  • Step 1 - Identify the component where Google IMA SDK is initialized in your app.
  • Step 2 - Include the VizbeeClient.brs as dependency in the xml of scene identified.
  • Step 3 - Pass imaSDK instance to Vizbee to monitor ad status as shown below

Instructions

  • Step 1 - Include the VizbeeClient.brs as dependency in the xml of scene identified.
  • Step 2 - Pass the SGVideoNode reference to the Vizbee SDK

Instructions

  • Step 1 - Identify the content which is not supported for casting
  • Step 2 - Do not invoke the 'setPlayerAdapter()' for the conetnt which is not supported for casting

Instructions

  • Step 1 - open the 'MyVizbeeAppAdapter' file in the 'vizbee' folder of your app's repo.
  • Step 2 - implement the 'onStart' method using the snippets provided below.

Add CastIcon to a ViewController or NavigationBar by making the cast button's hit region bigger without making the cast button image itself larger

When to use this approach

  • When CastButton's hit region needs bigger

Instructions

  • Step 1 - Subclass the VZBCastButton and override the backgroundRect as shown in the 2-VizbeeCastButton.swift snippet
  • Step 2 - Add VizbeeCastButton to the NavigationBar as shown in the 3-InstructionsToAddVizbeeCastButtonToNavigationbar.swift snippet

Scenario

Show the cast icon in light/dark theme as per the corresponding appearance setting on the user's device

  1. In Android, the cast icon will be part of the application's Activity, hence, the styling (color) can be provided by application's style file.
  2. Define the style item vzb_castIconColor in the app-style.xml as shown below.
  3. Create 2 colors.xml files, one in res/values folder and another in res/values-night folder.
  4. Now, define colorCastIcon items and set values to match light/dark theme as shown below. These values are picked based on the device's light/dark theme settings.

Example

Instructions

  • Step 1 - Identify the component where RAF is initialized and your app's RAF tracking callback is set.
  • Step 2 - Include the VizbeeClient.brs as dependency in the xml of scene identified.
  • Step 3 - Within your RAF traking callback, invoke Vizbee's RAF tracking callback as shown below.

Enable media controls to notification and lock screen for Chromecast

  • Step 1 - Add the dependency on Vizbee Sender SDK in your Android app’s module build.gradle
  • Step 1 - Create an instance of OptionsProvider as shown in CastOptionsProvider.kt.
  • Step 2 - Register app’s OptionsProvider implementation class as shown in AndroidManifest.xml
  • Step 3 - Start Google Cast Framework by invoking CastContext as shown in VizbeeWrapper.kt

Scenario

Setup both Light and Dark themes for styling of Vizbee cards to match the app's color pallete and fonts.

  1. Create a VizbeeStyles.swift file and update the lightTheme and rightTheme with the values which matches app's light/dark theme as specified here
  2. Update the style to light/dark theme as per the corresponding appearance setting on the user's device as shown below

Example

Light Theme

rectangular overlay

SmartPlay API returns true but content not playing on the receiver.

Example scenario

  • The sender is connected to the receiver.
  • The User selects any video to cast to the receiver.

Application code dos and don'ts

DO