Android FCC Rating Configuration Parameters

The TV Ratings feature is enabled by importing the following configuration classes into your main activity:
  • com.ooyala.android.configuration.Options
  • com.ooyala.android.configuration.FCCTVRatingConfiguration

    This step is shown in the following code sample:

import com.ooyala.android.configuration.FCCTVRatingConfiguration;
import com.ooyala.android.configuration.Options;

Instantiate the class and extend it using the following configuration options:

Parameter Description
setDurationSeconds

The amount of time, configured in seconds, that the rating should display as a watermark on the asset.

The default value is 10 seconds.

setPosition

The position of the of the rating watermark on the video asset. This parameter can have one of the following four values:

  • Position.TopLeft (Default)
  • Position.TopRight
  • Position.BottomLeft
  • Position.BottomRight
setScale

This parameter sets the scale of the rating watermark, relative to the size of the video asset.

This parameter takes any float value between 0 and 1. The default value is 0.2.

setOpacity

This parameter sets the opacity of the rating watermark.

This parameter takes any float value between 0 and 1. The default value is 0.9.

The following code example shows the class extended to set the position where the rating appears on the device screen:

FCCTVRatingConfiguration fccConfig = 
new FCCTVRatingConfiguration.Builder().setPosition(getTVRatingPosition()).setDurationSeconds(TVRATING_DURATION).build();
Options options = new Options.Builder().setTVRatingConfiguration(fccConfig).build();

For more information see Using the Android Options Configuration Class.

To see the TVRatings feature enabled in a working app get the Options sample app from the Ooyala Android Sample Apps Git repository and review Testing the Android Options Sample App topic.

Was this article helpful?