-Added helper text on click for background and popup button on detail fragment for feature discovery.
-Fixed popup video queuing causes existing popup player to change quality.
This commit is contained in:
parent
c443420e5b
commit
d6438dac9d
8 changed files with 383 additions and 363 deletions
|
|
@ -289,9 +289,7 @@ public final class BackgroundPlayer extends Service {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void handleIntent(Intent intent) {
|
||||
super.handleIntent(intent);
|
||||
|
||||
protected void postProcess(@NonNull final Intent intent) {
|
||||
resetNotification();
|
||||
startForeground(NOTIFICATION_ID, notBuilder.build());
|
||||
|
||||
|
|
|
|||
|
|
@ -251,6 +251,8 @@ public abstract class BasePlayer implements Player.EventListener,
|
|||
});
|
||||
}
|
||||
|
||||
protected abstract void postProcess(@NonNull final Intent intent);
|
||||
|
||||
public void handleIntent(Intent intent) {
|
||||
if (DEBUG) Log.d(TAG, "handleIntent() called with: intent = [" + intent + "]");
|
||||
if (intent == null) return;
|
||||
|
|
@ -284,6 +286,7 @@ public abstract class BasePlayer implements Player.EventListener,
|
|||
|
||||
// Good to go...
|
||||
initPlayback(this, queue);
|
||||
postProcess(intent);
|
||||
}
|
||||
|
||||
protected void initPlayback(@NonNull final PlaybackListener listener, @NonNull final PlayQueue queue) {
|
||||
|
|
|
|||
|
|
@ -270,11 +270,7 @@ public final class MainVideoPlayer extends Activity {
|
|||
@Override
|
||||
public int getPreferredResolution() {
|
||||
if (sharedPreferences == null || context == null) return Integer.MAX_VALUE;
|
||||
|
||||
return Localization.resolutionOf(sharedPreferences.getString(
|
||||
context.getString(R.string.default_resolution_key),
|
||||
context.getString(R.string.default_resolution_value)
|
||||
));
|
||||
return Localization.resolutionOf(sharedPreferences.getString(context.getString(R.string.default_resolution_key), context.getString(R.string.default_resolution_value)));
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -411,10 +411,7 @@ public final class PopupVideoPlayer extends Service {
|
|||
@Override
|
||||
public int getPreferredResolution() {
|
||||
if (sharedPreferences == null || context == null) return Integer.MAX_VALUE;
|
||||
return Localization.resolutionOf(sharedPreferences.getString(
|
||||
context.getString(R.string.default_popup_resolution_key),
|
||||
context.getString(R.string.default_popup_resolution_value)
|
||||
));
|
||||
return Localization.resolutionOf(sharedPreferences.getString(context.getString(R.string.default_popup_resolution_key), context.getString(R.string.default_popup_resolution_value)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -217,11 +217,7 @@ public abstract class VideoPlayer extends BasePlayer implements SimpleExoPlayer.
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void handleIntent(Intent intent) {
|
||||
super.handleIntent(intent);
|
||||
if (intent == null) return;
|
||||
|
||||
protected void postProcess(@NonNull final Intent intent) {
|
||||
final int resolutionTarget = intent.getIntExtra(MAX_RESOLUTION, getPreferredResolution());
|
||||
trackSelector.setParameters(
|
||||
// Assume video is horizontal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue