Skip to content
Snippets Groups Projects
Commit c0772af7 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Logic optimization

parent 2e02887b
No related branches found
No related tags found
No related merge requests found
......@@ -1685,8 +1685,8 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
if (mw == null)
return;
boolean isVideoPlaying = isVideoPlaying();
if (!mVideoBackground && mw.getType() == MediaWrapper.TYPE_VIDEO && isVideoPlaying)
boolean isVideoPlaying = mw.getType() == MediaWrapper.TYPE_VIDEO && isVideoPlaying();
if (!mVideoBackground && isVideoPlaying)
mw.addFlags(MediaWrapper.MEDIA_VIDEO);
if (mVideoBackground)
......@@ -1722,8 +1722,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
mMediaPlayer.setMedia(media);
media.release();
if (mw .getType() != MediaWrapper.TYPE_VIDEO || mw.hasFlag(MediaWrapper.MEDIA_FORCE_AUDIO)
|| isVideoPlaying) {
if (mw .getType() != MediaWrapper.TYPE_VIDEO || isVideoPlaying || mw.hasFlag(MediaWrapper.MEDIA_FORCE_AUDIO)) {
mMediaPlayer.setEqualizer(VLCOptions.getEqualizer(this));
mMediaPlayer.setVideoTitleDisplay(MediaPlayer.Position.Disable, 0);
changeAudioFocus(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment