* add prop adLanguage; add docs * add native code ios&android for adLanguage props * add missing function to adsLoader and imafactory * Update docs/pages/component/ads.md Language correction Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com> --------- Co-authored-by: Guy <guyha@reshet.tv> Co-authored-by: Olivier Bouillet <62574056+freeboub@users.noreply.github.com>
78 lines
2.1 KiB
Java
78 lines
2.1 KiB
Java
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.google.ads.interactivemedia.v3.api.ImaSdkSettings;
|
|
|
|
import java.io.IOException;
|
|
|
|
public class ImaAdsLoader implements AdsLoader {
|
|
private final ImaSdkSettings imaSdkSettings;
|
|
|
|
public ImaAdsLoader(ImaSdkSettings imaSdkSettings) {
|
|
this.imaSdkSettings = imaSdkSettings;
|
|
}
|
|
|
|
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 {
|
|
private ImaSdkSettings imaSdkSettings;
|
|
public Builder(Context ignoredThemedReactContext) {
|
|
}
|
|
|
|
public Builder setAdEventListener(Object ignoredReactExoplayerView) {
|
|
return this;
|
|
}
|
|
|
|
public Builder setAdErrorListener(Object ignoredReactExoplayerView) {
|
|
return this;
|
|
}
|
|
|
|
public Builder setImaSdkSettings(ImaSdkSettings imaSdkSettings) {
|
|
this.imaSdkSettings = imaSdkSettings;
|
|
return this;
|
|
}
|
|
|
|
public ImaAdsLoader build() {
|
|
return null;
|
|
}
|
|
}
|
|
}
|