Android SDK Version
- AbstractAdListener
- Ad
- AdChoicesView
- AdError
- AdIconView
- AdListener
- AdOptionsView
- AdOptionsView.Orientation
- AdSettings
- AdSettings.IntegrationErrorMode
- AdSettings.MultiprocessSupportMode
- AdSettings.TestAdType
- AdSize
- AdView
- AudienceNetworkActivity
- AudienceNetworkAds
- AudienceNetworkAds.AdFormat
- AudienceNetworkAds.InitListener
- AudienceNetworkAds.InitResult
- AudienceNetworkAds.InitSettingsBuilder
- BidderTokenProvider
- CacheFlag
- DefaultMediaViewVideoRenderer
- ExtraHints
- ExtraHints.Builder
- ExtraHints.HintType
- ExtraHints.Keyword
- InstreamVideoAdListener
- InstreamVideoAdView
- InterstitialAd
- InterstitialAdExtendedListener
- InterstitialAdListener
- MediaView
- MediaViewListener
- MediaViewVideoRenderer
- MediaViewVideoRendererWithBackgroundPlayback
- NativeAd
- NativeAd.AdCreativeType
- NativeAdBase
- NativeAdBase.Image
- NativeAdBase.MediaCacheFlag
- NativeAdBase.NativeComponentTag
- NativeAdBase.Rating
- NativeAdLayout
- NativeAdListener
- NativeAdScrollView
- NativeAdScrollView.AdViewProvider
- NativeAdsManager
- NativeAdsManager.Listener
- NativeAdView
- NativeAdView.Type
- NativeAdViewAttributes
- NativeBannerAd
- NativeBannerAdView
- NativeBannerAdView.Type
- RewardData
- RewardedVideoAd
- RewardedVideoAdExtendedListener
- RewardedVideoAdListener
- S2SRewardedVideoAdExtendedListener
- S2SRewardedVideoAdListener
- VideoAutoplayBehavior
- VideoStartReason
- java.lang.Object
- FrameLayout
- com.facebook.ads.internal.api.AdComponentView
- com.facebook.ads.MediaViewVideoRenderer
- com.facebook.ads.MediaViewVideoRendererWithBackgroundPlayback
public final class MediaViewVideoRendererWithBackgroundPlayback extends MediaViewVideoRenderer
This is a Default VideoViewRenderer used within MediaView. It can be replaced with any customized MediaViewVideoRenderer by calling
MediaView.setVideoRenderer(MediaViewVideoRenderer)
Since:
5.0
Constructor Summary
Constructor and Description |
---|
MediaViewVideoRendererWithBackgroundPlayback(Context context) |
MediaViewVideoRendererWithBackgroundPlayback(Context context, AttributeSet attrs) |
MediaViewVideoRendererWithBackgroundPlayback(Context context, AttributeSet attrs, int defStyleAttr) |
MediaViewVideoRendererWithBackgroundPlayback(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) |
Method Summary
Modifier and Type | Method and Description |
---|---|
void | onPrepared() Callback when the video is prepared and ready to play. |
boolean | shouldAllowBackgroundPlayback() Whether background video playback should be enabled or not. |
Methods inherited from class com.facebook.ads.
addView, addView, addView, addView, addView, destroy, disengageSeek, engageSeek, getCurrentTimeMs, getDuration, getMediaViewVideoRendererApi, getVolume, onCompleted, onError, onPaused, onPlayed, onSeek, onSeekDisengaged, onSeekEngaged, onVolumeChanged, pause, play, seekTo, setNativeAd, setVolume, shouldAutoplay, unsetNativeAd
Constructor Detail
MediaViewVideoRendererWithBackgroundPlayback
public MediaViewVideoRendererWithBackgroundPlayback(Context context)
MediaViewVideoRendererWithBackgroundPlayback
public MediaViewVideoRendererWithBackgroundPlayback(Context context, AttributeSet attrs)
MediaViewVideoRendererWithBackgroundPlayback
public MediaViewVideoRendererWithBackgroundPlayback(Context context, AttributeSet attrs, int defStyleAttr)
MediaViewVideoRendererWithBackgroundPlayback
public MediaViewVideoRendererWithBackgroundPlayback(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Method Detail
onPrepared
public void onPrepared()
Description copied from class:
MediaViewVideoRenderer
Callback when the video is prepared and ready to play.
Overrides:
onPrepared
in class MediaViewVideoRenderer
shouldAllowBackgroundPlayback
public boolean shouldAllowBackgroundPlayback()
Description copied from class:
MediaViewVideoRenderer
Whether background video playback should be enabled or not. This will allow videos in Native Ads to keep playing sound when the video is off-screen. It will not work when the video is set to full screen mode. Override this and return true to enable background playback.
Overrides:
Returns:
true if background video playback is enabled, false otherwise