add note
This commit is contained in:
parent
700419c477
commit
3400b01da0
1 changed files with 3 additions and 2 deletions
|
@ -178,10 +178,11 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen
|
||||||
.setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
|
.setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT < 26) {
|
//if (Build.VERSION.SDK_INT < 26) {
|
||||||
// Deprecated in API Level 26, use above AudioAtrributes instead
|
// Deprecated in API Level 26, use above AudioAtrributes instead
|
||||||
|
// TODO: convert code to replace deprecated setAudioStreamType and requestAudioFocus(AudioManager.OnAudioFocusChangeListener l, int streamType, int durationHint)
|
||||||
mediaPlayer.setAudioStreamType(streamType);
|
mediaPlayer.setAudioStreamType(streamType);
|
||||||
}
|
//}
|
||||||
mediaPlayer.setDataSource(file.getAbsolutePath());
|
mediaPlayer.setDataSource(file.getAbsolutePath());
|
||||||
mediaPlayer.prepare();
|
mediaPlayer.prepare();
|
||||||
mediaPlayer.setOnCompletionListener(this);
|
mediaPlayer.setOnCompletionListener(this);
|
||||||
|
|
Loading…
Reference in a new issue