fix(android): remove remaining ad view when zapping (#3786)

* perf: ensure we do not provide callback to native if no callback provided from app

* chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size

* chore: improve issue template

* fix(android): avoid video view flickering at playback startup

* fix(android): ensure adsLoader is well release if unused
This commit is contained in:
Olivier Bouillet 2024-05-16 15:57:27 +02:00 committed by GitHub
parent 8ee4bccc37
commit 324b461527
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -712,6 +712,11 @@ public class ReactExoplayerView extends FrameLayout implements
.setLocalAdInsertionComponents(unusedAdTagUri -> adsLoader, exoPlayerView);
DataSpec adTagDataSpec = new DataSpec(adTagUrl);
mediaSourceWithAds = new AdsMediaSource(videoSource, adTagDataSpec, ImmutableList.of(srcUri, adTagUrl), mediaSourceFactory, adsLoader, exoPlayerView);
} else {
if (adTagUrl == null && adsLoader != null) {
adsLoader.release();
adsLoader = null;
}
}
MediaSource mediaSource;
if (mediaSourceList.size() == 0) {