ANVideoPlayerSettings クラスを使用すると、パブリッシャー アプリで一部の Ad Video Player UI/コントロールをカスタマイズできます。
注:
このカスタマイズは、Xandr SDK を通じて配信されるすべての動画広告に、インストリームとバナー ビデオ (Outstream) の両方に適用されます。
| 機能 | 既定の設定 | 説明 | 設定をサポートする広告ユニット |
|---|---|---|---|
void shouldShowClickThroughControl (boolean showClickThroughControl) |
true | ClickThrough コントロールを表示するかどうかを指定します。 false に設定すると、ビデオ全体がクリックできるようになります。 | インストリーム/ バナー ビデオ |
void setClickThroughText (string clickThroughText) |
"詳細情報" | ClickThrough コントロールに関連付けられているテキストをカスタマイズします。 | インストリーム/ バナー ビデオ |
void shouldShowFullScreenControl (boolean showFullScreenControl)(バナー ビデオのみ) |
true | 全画面表示ボタンの表示を制御します。 | バナー ビデオ |
void shouldShowTopBar (boolean showTopBar) |
true | ClickThrough コントロールと Skip コントロールを含む上部のバーを表示するかどうかを指定します。 | インストリーム/ バナー ビデオ |
void shouldShowAdText (boolean showAdText) |
true | ClickThrough コントロールの横にある広告テキストの表示を制御します。 | インストリーム / バナー ビデオ / スポット |
void setAdText (string adText) |
"Ad" | ビデオ プレーヤーの広告テキストをカスタマイズします。 | インストリーム / バナー ビデオ / スポット |
void shouldShowVolumeControl (boolean showVolumeControl) |
true | ミュート/ミュート解除コントロールの可視性を制御します。 | インストリーム/ バナー ビデオ |
void setInitialAudio (ANInitialAudioSetting initialAudio) |
サウンド オン (インストリーム)、サウンド オフ (バナー ビデオ) | オーディオの初期状態を設定します。 | インストリーム/ バナー ビデオ |
void shouldShowSkip (boolean showSkip)(インストリーム ビデオのみ) |
true | Skip コントロールの可視性を制御します。 | インストリーム/スポット |
void setSkipDescription (StringskipDescription) |
"%%TIME%%s でスキップ" | [説明のスキップ] をカスタマイズします。 | インストリーム/スポット |
void setSkipLabelName (StringskipLabelName) |
"広告のスキップ" | ラベルのスキップをカスタマイズします。 | インストリーム/スポット |
void setSkipOffset (IntegerskipOffset) |
"5 秒" | スキップ オフセットをカスタマイズします。 | インストリーム/スポット |
例
// Show or Hide the ClickThrough control on the video player. Default is YES, setting it to NO will make the entire video clickable
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowClickThroughControl(false);
// Change the ClickThrough text on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setClickThroughText("SampleText");
// Show or hide fullscreen control on the player. This is applicable only for Banner Video
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowFullScreenControl(true);
// Show or hide the top bar that has (ClickThrough & Skip control)
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowTopBar(true);
// Show or hide the "Ad" text next to the ClickThrough control
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowAdText(true);
ANVideoPlayerSettings.getVideoPlayerSettings().setAdText("Video Ad");
// Show or hide the volume control on the player
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowVolumeControl(true);
// Decide how the ad video sound starts initially (sound on or off). By default, Instream Video will have sound enabled, while Banner Video will have sound disabled
ANVideoPlayerSettings.getVideoPlayerSettings().setInitialAudio(DEFAULT);
ANVideoPlayerSettings.getVideoPlayerSettings().setInitialAudio(SOUND_ON);
ANVideoPlayerSettings.getVideoPlayerSettings().setInitialAudio(SOUND_OFF);
// Show or hide the Skip control on the player
ANVideoPlayerSettings.getVideoPlayerSettings().shouldShowSkip(true);
// Change the skip description on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setSkipDescription("Video Skip Demo");
// Change the skip button text on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setSkipLabelName("Test");
// Configure the skip offset on the video player
ANVideoPlayerSettings.getVideoPlayerSettings().setSkipOffset(2);