- Bump Exoplayer to 2.10.4 - Remove deprecated usages of Exoplayer methdos - Add `ReactExoplayerConfig` as extension points to configure the Exoplayer instance
21 lines
507 B
Java
21 lines
507 B
Java
package com.brentvatne.exoplayer;
|
|
|
|
import android.content.Context;
|
|
|
|
import com.google.android.exoplayer2.upstream.DataSource;
|
|
import com.google.android.exoplayer2.upstream.RawResourceDataSource;
|
|
|
|
class RawResourceDataSourceFactory implements DataSource.Factory {
|
|
|
|
private final Context context;
|
|
|
|
RawResourceDataSourceFactory(Context context) {
|
|
this.context = context;
|
|
}
|
|
|
|
@Override
|
|
public DataSource createDataSource() {
|
|
return new RawResourceDataSource(context);
|
|
}
|
|
}
|