use of org.prebid.mobile.rendering.video.VideoCreativeView in project prebid-mobile-android by prebid.
the class VideoView method showVideoCreative.
private void showVideoCreative(View view) {
VideoCreativeView videoCreativeView = (VideoCreativeView) view;
if (mEnableVideoPlayerClick) {
videoCreativeView.enableVideoPlayerClick();
}
videoCreativeView.showVolumeControls();
addVideoControlObstruction(videoCreativeView.getVolumeControlView(), "Volume button");
addView(view);
}
use of org.prebid.mobile.rendering.video.VideoCreativeView in project prebid-mobile-android by prebid.
the class VideoViewTest method viewReadyForImmediateDisplay_notShowingEndCard_ShowVideoCreative.
@Test
public void viewReadyForImmediateDisplay_notShowingEndCard_ShowVideoCreative() {
final VideoCreativeView mockVideoCreativeView = mock(VideoCreativeView.class);
when(mMockAdViewManager.isNotShowingEndCard()).thenReturn(true);
mVideoView.setVideoPlayerClick(true);
mAdViewManagerListener.viewReadyForImmediateDisplay(mockVideoCreativeView);
verify(mMockVideoViewListener).onDisplayed(eq(mVideoView));
verify(mockVideoCreativeView).enableVideoPlayerClick();
verify(mockVideoCreativeView).showVolumeControls();
}
use of org.prebid.mobile.rendering.video.VideoCreativeView in project prebid-mobile-android by prebid.
the class AdViewManager method returnFromVideo.
public void returnFromVideo(View callingView) {
if (mCurrentCreative != null && mCurrentCreative.isBuiltInVideo()) {
View creativeView = mCurrentCreative.getCreativeView();
if (creativeView instanceof VideoCreativeView && mCurrentCreative.isVideo()) {
VideoCreativeView videoCreativeView = (VideoCreativeView) creativeView;
VideoCreative videoCreative = (VideoCreative) mCurrentCreative;
videoCreativeView.hideCallToAction();
videoCreativeView.mute();
videoCreative.updateAdView(callingView);
videoCreative.onPlayerStateChanged(InternalPlayerState.NORMAL);
}
}
}
Aggregations