fix(android): ads build and enable ads in android sample (#3376)
* fix: refactor androidx core version management * chore: fix missing import rework for media3 * fix: enable IMA in sample * chore: rename stub fie * chore: code review, fix variable name * chore: reorder imports * chore: fix linking in sample * chore: fix stub management * chore: few cleans and ensure we don't use ima is disabled --------- Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
package androidx.media3.exoplayer.ima;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.AdViewProvider;
|
||||
import androidx.media3.common.Player;
|
||||
import androidx.media3.datasource.DataSpec;
|
||||
import androidx.media3.exoplayer.ExoPlayer;
|
||||
import androidx.media3.exoplayer.source.ads.AdsLoader;
|
||||
import androidx.media3.exoplayer.source.ads.AdsMediaSource;
|
||||
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class ImaAdsLoader implements AdsLoader {
|
||||
public void setPlayer(ExoPlayer ignoredPlayer) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlayer(@Nullable Player player) {
|
||||
}
|
||||
|
||||
public void release() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSupportedContentTypes(@NonNull int... ints) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(@NonNull AdsMediaSource adsMediaSource, @NonNull DataSpec dataSpec, @NonNull Object adsId, @NonNull AdViewProvider adViewProvider, @NonNull EventListener eventListener) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(@NonNull AdsMediaSource adsMediaSource, @NonNull EventListener eventListener) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlePrepareComplete(@NonNull AdsMediaSource adsMediaSource, int i, int i1) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlePrepareError(@NonNull AdsMediaSource adsMediaSource, int i, int i1, @NonNull IOException e) {
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
public Builder(Context ignoredThemedReactContext) {
|
||||
}
|
||||
|
||||
public Builder setAdEventListener(Object ignoredReactExoplayerView) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImaAdsLoader build() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user