Set user-agent for file playback
This commit is contained in:
parent
0e05a8af7b
commit
dbbe614c33
|
@ -65,7 +65,7 @@ project.ext {
|
|||
rxAndroidVersion = "2.1.1"
|
||||
rxJavaVersion = "2.2.2"
|
||||
iconifyVersion = "2.2.2"
|
||||
audioPlayerVersion = "v1.0.17"
|
||||
audioPlayerVersion = "v2.0.0"
|
||||
|
||||
// Google Play build
|
||||
wearableSupportVersion = "2.6.0"
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.preference.PreferenceManager;
|
|||
import android.util.Log;
|
||||
import android.view.SurfaceHolder;
|
||||
|
||||
import de.danoeh.antennapod.core.ClientConfig;
|
||||
import org.antennapod.audio.MediaPlayer;
|
||||
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
|
@ -17,7 +18,7 @@ public class AudioPlayer extends MediaPlayer implements IPlayer {
|
|||
private static final String TAG = "AudioPlayer";
|
||||
|
||||
public AudioPlayer(Context context) {
|
||||
super(context);
|
||||
super(context, true, ClientConfig.USER_AGENT);
|
||||
PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.registerOnSharedPreferenceChangeListener((sharedPreferences, key) -> {
|
||||
if (key.equals(UserPreferences.PREF_MEDIA_PLAYER)) {
|
||||
|
|
Loading…
Reference in New Issue