Last active
July 31, 2020 11:39
-
-
Save ForceTower/c5a9df48c4455ee748b08fc297281947 to your computer and use it in GitHub Desktop.
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
package io.flutter.plugins.videoplayer; | |
import com.google.android.exoplayer2.upstream.DataSource; | |
import com.google.android.exoplayer2.upstream.crypto.AesCipherDataSource; | |
public class AESCipherDataSourceFactory implements DataSource.Factory { | |
private final DataSource source; | |
private final String secret; | |
public AESCipherDataSourceFactory(DataSource source, String secret) { | |
this.source = source; | |
this.secret = secret; | |
} | |
@Override | |
public DataSource createDataSource() { | |
return new AesCipherDataSource(secret.getBytes(), this.source); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment