Search in sources :

Example 1 with VideoCreativeView

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);
}
Also used : VideoCreativeView(org.prebid.mobile.rendering.video.VideoCreativeView)

Example 2 with VideoCreativeView

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();
}
Also used : VideoCreativeView(org.prebid.mobile.rendering.video.VideoCreativeView) Test(org.junit.Test)

Example 3 with VideoCreativeView

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);
        }
    }
}
Also used : VideoCreative(org.prebid.mobile.rendering.video.VideoCreative) InterstitialView(org.prebid.mobile.rendering.bidding.display.InterstitialView) View(android.view.View) VideoCreativeView(org.prebid.mobile.rendering.video.VideoCreativeView) VideoCreativeView(org.prebid.mobile.rendering.video.VideoCreativeView)

Aggregations

VideoCreativeView (org.prebid.mobile.rendering.video.VideoCreativeView)3 View (android.view.View)1 Test (org.junit.Test)1 InterstitialView (org.prebid.mobile.rendering.bidding.display.InterstitialView)1 VideoCreative (org.prebid.mobile.rendering.video.VideoCreative)1