listener bug

This commit is contained in:
Yuriy Liskov
2020-10-04 09:36:55 +03:00
parent 6c9541baa7
commit 2065cdba1a
3 changed files with 7 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ public class HqDialogManager extends PlayerEventListenerHelper {
public void onController(PlaybackController controller) {
super.onController(controller);
controller.setBuffer(AppPrefs.instance(mActivity).getVideoBufferType(PlaybackEngineController.BUFFER_MED));
controller.setBuffer(AppPrefs.instance(mActivity).getVideoBufferType(PlaybackEngineController.BUFFER_LOW));
}
private void addQualityCategories() {

View File

@@ -10,6 +10,7 @@ import com.liskovsoft.sharedutils.helpers.KeyHelpers;
import com.liskovsoft.sharedutils.helpers.MessageHelpers;
import com.liskovsoft.sharedutils.mylogger.Log;
import com.liskovsoft.smartyoutubetv2.common.R;
import com.liskovsoft.smartyoutubetv2.common.app.models.data.Video;
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.PlayerEventListenerHelper;
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.managers.SuggestionsLoader.MetadataListener;
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.ui.UiOptionItem;
@@ -101,6 +102,11 @@ public class PlayerUiManager extends PlayerEventListenerHelper implements Metada
@Override
public void onEngineInitialized() {
mEngineReady = true;
}
@Override
public void onVideoLoaded(Video item) {
// Next lines on engine initialized stage cause other listeners to disappear.
mController.showDebugView(mDebugViewEnabled);
mController.setDebugButtonState(mDebugViewEnabled);
}

View File

@@ -1,6 +1,5 @@
package com.liskovsoft.smartyoutubetv2.common.exoplayer.controller;
import android.app.Activity;
import android.content.Context;
import com.google.android.exoplayer2.ExoPlaybackException;
import com.google.android.exoplayer2.ExoPlayer;
@@ -17,7 +16,6 @@ import com.liskovsoft.smartyoutubetv2.common.app.models.data.Video;
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.listener.PlayerEventListener;
import com.liskovsoft.smartyoutubetv2.common.autoframerate.FormatItem;
import com.liskovsoft.smartyoutubetv2.common.exoplayer.ExoMediaSourceFactory;
import com.liskovsoft.smartyoutubetv2.common.exoplayer.other.DebugInfoManager;
import com.liskovsoft.smartyoutubetv2.common.exoplayer.selector.ExoFormatItem;
import com.liskovsoft.smartyoutubetv2.common.exoplayer.selector.TrackSelectorManager;
import com.liskovsoft.smartyoutubetv2.common.exoplayer.selector.TrackSelectorUtil;