次の方法で共有


Android でビデオ プレーヤー のオプションをカスタマイズする

ANVideoPlayerSettings クラスを使用すると、パブリッシャー アプリで一部の Ad Video Player UI/コントロールをカスタマイズできます。

注:

このカスタマイズは、Xandr SDK を通じて配信されるすべての動画広告に、インストリームとバナー ビデオ (Outstream) の両方に適用されます。

機能 既定の設定 説明 設定をサポートする広告ユニット
void shouldShowClickThroughControl
(booleanshowClickThroughControl)
true ClickThrough コントロールを表示するかどうかを指定します。 false に設定すると、ビデオ全体がクリックできるようになります。 インストリーム/ バナー ビデオ
void setClickThroughText
(stringclickThroughText)
"詳細情報" ClickThrough コントロールに関連付けられているテキストをカスタマイズします。 インストリーム/ バナー ビデオ
void shouldShowFullScreenControl
(booleanshowFullScreenControl)(バナー ビデオのみ)
true 全画面表示ボタンの表示を制御します。 バナー ビデオ
void shouldShowTopBar
(booleanshowTopBar)
true ClickThrough コントロールと Skip コントロールを含む上部のバーを表示するかどうかを指定します。 インストリーム/ バナー ビデオ
void shouldShowAdText
(booleanshowAdText)
true ClickThrough コントロールの横にある広告テキストの表示を制御します。 インストリーム / バナー ビデオ / スポット
void setAdText
(stringadText)
"Ad" ビデオ プレーヤーの広告テキストをカスタマイズします。 インストリーム / バナー ビデオ / スポット
void shouldShowVolumeControl
(booleanshowVolumeControl)
true ミュート/ミュート解除コントロールの可視性を制御します。 インストリーム/ バナー ビデオ
void setInitialAudio
(ANInitialAudioSettinginitialAudio)
サウンド オン (インストリーム)、サウンド オフ (バナー ビデオ) オーディオの初期状態を設定します。 インストリーム/ バナー ビデオ
void shouldShowSkip
(booleanshowSkip)(インストリーム ビデオのみ)
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);