fix crash bug when trying to play content
This commit is contained in:
parent
696bc86b7c
commit
b60ca39df1
1 changed files with 4 additions and 1 deletions
|
@ -316,7 +316,10 @@ public class FileViewFragment extends BaseFragment implements
|
|||
hideBuffering();
|
||||
|
||||
if (loadingNewClaim) {
|
||||
MainActivity.appPlayer.setPlayWhenReady(Objects.requireNonNull((MainActivity) (getActivity())).isMediaAutoplayEnabled());
|
||||
Context context = getContext();
|
||||
if (context instanceof MainActivity) {
|
||||
MainActivity.appPlayer.setPlayWhenReady(((MainActivity) context).isMediaAutoplayEnabled());
|
||||
}
|
||||
loadingNewClaim = false;
|
||||
}
|
||||
} else if (playbackState == Player.STATE_BUFFERING) {
|
||||
|
|
Loading…
Reference in a new issue