-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
11 changed files
with
94 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
android/src/main/java/androidx/media3/exoplayer/ima/ImaAdsLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
android/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6129,9 +6129,6 @@ react-is@^17.0.1: | |
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" | ||
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== | ||
|
||
react-native-video@../../: | ||
version "6.0.0-beta.0" | ||
|
||
[email protected]: | ||
version "0.63.41" | ||
resolved "https://registry.yarnpkg.com/react-native-windows/-/react-native-windows-0.63.41.tgz#96f59bc24749b6c167cb4f35fd74b66f78f4a4bb" | ||
|