Configuring the Ooyala Player Options

The Android Mobile SDK allows you to programmatically configure Ooyala Player options, including TV Ratings, VisualOn, cue points, and other options. To get started, view the documentation for the class available in the Mobile SDK for Android.

The Options class contains a Builder() method that creations an object instance with a default configuration. Invoke the Builder() method and append the desired option method calls according to a builder pattern, which is completed with a call to the build() method. The following example, which configures the preload content and promo image, illustrates the syntax:
boolean showPromoImage = this.showPromoImageButton.isChecked();
boolean preload = this.preloadButton.isChecked();

Options options = new Options.Builder().setPreloadContent(preload).setShowPromoImage(showPromoImage).build();

See PreloadOptionsPlayerActivity for a complete code example.

Was this article helpful?