mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +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){
|
if(getCurrentSpeedId() == speed){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setFadingEnabled(true);
|
// setFadingEnabled(true);
|
||||||
fragment.setFadingEnabled(true);
|
// fragment.setFadingEnabled(true);
|
||||||
if(mTransportControls != null){
|
if(mTransportControls != null){
|
||||||
mTransportControls.play();
|
mTransportControls.play();
|
||||||
} else {
|
} else {
|
||||||
|
@ -250,8 +250,8 @@ public class PlaybackHelper extends PlaybackControlGlue {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void pausePlayback() {
|
protected void pausePlayback() {
|
||||||
setFadingEnabled(false);
|
// setFadingEnabled(false);
|
||||||
fragment.setFadingEnabled(false);
|
// fragment.setFadingEnabled(false);
|
||||||
if(mTransportControls != null){
|
if(mTransportControls != null){
|
||||||
mTransportControls.pause();
|
mTransportControls.pause();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -126,7 +126,6 @@ public class OverlayFragment extends PlaybackFragment{
|
||||||
|
|
||||||
setBackgroundType(PlaybackFragment.BG_LIGHT);
|
setBackgroundType(PlaybackFragment.BG_LIGHT);
|
||||||
setFadingEnabled(false);
|
setFadingEnabled(false);
|
||||||
mHelper.setFadingEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -158,6 +157,7 @@ public class OverlayFragment extends PlaybackFragment{
|
||||||
Log.d(TAG,"Callback not set or not event/stream");
|
Log.d(TAG,"Callback not set or not event/stream");
|
||||||
}
|
}
|
||||||
requestAudioFocus();
|
requestAudioFocus();
|
||||||
|
play();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Row getRelatedItems() {
|
private Row getRelatedItems() {
|
||||||
|
@ -298,11 +298,13 @@ public class OverlayFragment extends PlaybackFragment{
|
||||||
|
|
||||||
private void play() {
|
private void play() {
|
||||||
setPlaybackState(PlaybackState.STATE_PLAYING);
|
setPlaybackState(PlaybackState.STATE_PLAYING);
|
||||||
|
setFadingEnabled(true);
|
||||||
mCallback.play();
|
mCallback.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pause() {
|
private void pause() {
|
||||||
setPlaybackState(PlaybackState.STATE_PAUSED);
|
setPlaybackState(PlaybackState.STATE_PAUSED);
|
||||||
|
setFadingEnabled(false);
|
||||||
mCallback.pause();
|
mCallback.pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue