com.google.ads.interactivemedia.v3.api.player.VideoProgressUpdate Java Examples
The following examples show how to use
com.google.ads.interactivemedia.v3.api.player.VideoProgressUpdate.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdController.java From xipl with Apache License 2.0 | 5 votes |
@Override public VideoProgressUpdate getAdProgress() { if (mTvPlayer == null) { return VideoProgressUpdate.VIDEO_TIME_NOT_READY; } return new VideoProgressUpdate(mTvPlayer.getCurrentPosition(), mTvPlayer.getDuration()); }
Example #2
Source File: AdController.java From androidtv-sample-inputs with Apache License 2.0 | 5 votes |
@Override public VideoProgressUpdate getAdProgress() { if (mTvPlayer == null) { return VideoProgressUpdate.VIDEO_TIME_NOT_READY; } return new VideoProgressUpdate(mTvPlayer.getCurrentPosition(), mTvPlayer.getDuration()); }
Example #3
Source File: ImaPlayer.java From google-media-framework-android with Apache License 2.0 | 5 votes |
@Override public VideoProgressUpdate getContentProgress() { if (adPlayer != null || contentPlayer == null || contentPlayer.getDuration() <= 0) { return VideoProgressUpdate.VIDEO_TIME_NOT_READY; } return new VideoProgressUpdate(contentPlayer.getCurrentPosition(), contentPlayer.getDuration()); }
Example #4
Source File: ImaService.java From googleads-ima-android with Apache License 2.0 | 5 votes |
public void requestAds(String adTagUrl) { AdsRequest request = sdkFactory.createAdsRequest(); request.setAdTagUrl(adTagUrl); // The ContentProgressProvider is only needed for scheduling ads with VMAP ad requests request.setContentProgressProvider( new ContentProgressProvider() { @Override public VideoProgressUpdate getContentProgress() { return new VideoProgressUpdate(exoPlayer.getCurrentPosition(), exoPlayer.getDuration()); } }); adsLoader.requestAds(request); }
Example #5
Source File: ImaService.java From googleads-ima-android with Apache License 2.0 | 5 votes |
@Override public VideoProgressUpdate getAdProgress() { if (currentAd == null) { return null; } return new VideoProgressUpdate(exoPlayer.getCurrentPosition(), exoPlayer.getDuration()); }