mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Pass app context to the IMA SDK
Notes: this doesn't fix the current issue where the component containing the ad overlay view leaks, but is good practice anyway. PiperOrigin-RevId: 308582036
This commit is contained in:
parent
49e5e66033
commit
f052e89a8f
1 changed files with 3 additions and 1 deletions
|
|
@ -477,7 +477,9 @@ public final class ImaAdsLoader
|
||||||
adCallbacks = new ArrayList<>(/* initialCapacity= */ 1);
|
adCallbacks = new ArrayList<>(/* initialCapacity= */ 1);
|
||||||
adDisplayContainer = imaFactory.createAdDisplayContainer();
|
adDisplayContainer = imaFactory.createAdDisplayContainer();
|
||||||
adDisplayContainer.setPlayer(/* videoAdPlayer= */ this);
|
adDisplayContainer.setPlayer(/* videoAdPlayer= */ this);
|
||||||
adsLoader = imaFactory.createAdsLoader(context, imaSdkSettings, adDisplayContainer);
|
adsLoader =
|
||||||
|
imaFactory.createAdsLoader(
|
||||||
|
context.getApplicationContext(), imaSdkSettings, adDisplayContainer);
|
||||||
adsLoader.addAdErrorListener(/* adErrorListener= */ this);
|
adsLoader.addAdErrorListener(/* adErrorListener= */ this);
|
||||||
adsLoader.addAdsLoadedListener(/* adsLoadedListener= */ this);
|
adsLoader.addAdsLoadedListener(/* adsLoadedListener= */ this);
|
||||||
fakeContentProgressElapsedRealtimeMs = C.TIME_UNSET;
|
fakeContentProgressElapsedRealtimeMs = C.TIME_UNSET;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue