-
-
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.
- Bump Exoplayer to 2.10.4 - Remove deprecated usages of Exoplayer methdos - Add `ReactExoplayerConfig` as extension points to configure the Exoplayer instance
- Loading branch information
1 parent
81cfd4e
commit 3e38f88
Showing
8 changed files
with
154 additions
and
83 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
26 changes: 26 additions & 0 deletions
26
android-exoplayer/src/main/java/com/brentvatne/exoplayer/DefaultReactExoplayerConfig.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,26 @@ | ||
package com.brentvatne.exoplayer; | ||
|
||
import android.content.Context; | ||
|
||
import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter; | ||
import com.google.android.exoplayer2.upstream.DefaultLoadErrorHandlingPolicy; | ||
import com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy; | ||
|
||
public class DefaultReactExoplayerConfig implements ReactExoplayerConfig { | ||
|
||
private final DefaultBandwidthMeter bandwidthMeter; | ||
|
||
public DefaultReactExoplayerConfig(Context context) { | ||
this.bandwidthMeter = new DefaultBandwidthMeter.Builder(context).build(); | ||
} | ||
|
||
@Override | ||
public LoadErrorHandlingPolicy buildLoadErrorHandlingPolicy(int minLoadRetryCount) { | ||
return new DefaultLoadErrorHandlingPolicy(minLoadRetryCount); | ||
} | ||
|
||
@Override | ||
public DefaultBandwidthMeter getBandwidthMeter() { | ||
return bandwidthMeter; | ||
} | ||
} |
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
13 changes: 13 additions & 0 deletions
13
android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerConfig.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,13 @@ | ||
package com.brentvatne.exoplayer; | ||
|
||
import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter; | ||
import com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy; | ||
|
||
/** | ||
* Extension points to configure the Exoplayer instance | ||
*/ | ||
public interface ReactExoplayerConfig { | ||
LoadErrorHandlingPolicy buildLoadErrorHandlingPolicy(int minLoadRetryCount); | ||
|
||
DefaultBandwidthMeter getBandwidthMeter(); | ||
} |
Oops, something went wrong.