mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 04:43:07 +00:00
autoplay video
This commit is contained in:
parent
91cb464553
commit
e7a597f702
2 changed files with 7 additions and 5 deletions
|
@ -239,8 +239,8 @@ public class PlaybackHelper extends PlaybackControlGlue {
|
|||
if(getCurrentSpeedId() == speed){
|
||||
return;
|
||||
}
|
||||
setFadingEnabled(true);
|
||||
fragment.setFadingEnabled(true);
|
||||
// setFadingEnabled(true);
|
||||
// fragment.setFadingEnabled(true);
|
||||
if(mTransportControls != null){
|
||||
mTransportControls.play();
|
||||
} else {
|
||||
|
@ -250,8 +250,8 @@ public class PlaybackHelper extends PlaybackControlGlue {
|
|||
|
||||
@Override
|
||||
protected void pausePlayback() {
|
||||
setFadingEnabled(false);
|
||||
fragment.setFadingEnabled(false);
|
||||
// setFadingEnabled(false);
|
||||
// fragment.setFadingEnabled(false);
|
||||
if(mTransportControls != null){
|
||||
mTransportControls.pause();
|
||||
} else {
|
||||
|
|
|
@ -126,7 +126,6 @@ public class OverlayFragment extends PlaybackFragment{
|
|||
|
||||
setBackgroundType(PlaybackFragment.BG_LIGHT);
|
||||
setFadingEnabled(false);
|
||||
mHelper.setFadingEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -158,6 +157,7 @@ public class OverlayFragment extends PlaybackFragment{
|
|||
Log.d(TAG,"Callback not set or not event/stream");
|
||||
}
|
||||
requestAudioFocus();
|
||||
play();
|
||||
}
|
||||
|
||||
private Row getRelatedItems() {
|
||||
|
@ -298,11 +298,13 @@ public class OverlayFragment extends PlaybackFragment{
|
|||
|
||||
private void play() {
|
||||
setPlaybackState(PlaybackState.STATE_PLAYING);
|
||||
setFadingEnabled(true);
|
||||
mCallback.play();
|
||||
}
|
||||
|
||||
private void pause() {
|
||||
setPlaybackState(PlaybackState.STATE_PAUSED);
|
||||
setFadingEnabled(false);
|
||||
mCallback.pause();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue