mirror of
https://github.com/yuliskov/SmartTube.git
synced 2025-08-24 10:20:48 +08:00
video card: playback preview: upd 8
This commit is contained in:
@ -16,9 +16,12 @@ import com.liskovsoft.sharedutils.mylogger.Log;
|
|||||||
import com.liskovsoft.sharedutils.rx.RxHelper;
|
import com.liskovsoft.sharedutils.rx.RxHelper;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.AppDialogPresenter;
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.AppDialogPresenter;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.BrowsePresenter;
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.BrowsePresenter;
|
||||||
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.ChannelPresenter;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.ChannelUploadsPresenter;
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.ChannelUploadsPresenter;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.PlaybackPresenter;
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.PlaybackPresenter;
|
||||||
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.SearchPresenter;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.SplashPresenter;
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.SplashPresenter;
|
||||||
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.base.BasePresenter;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.dialogs.AppUpdatePresenter;
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.dialogs.AppUpdatePresenter;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.misc.MotherActivity;
|
import com.liskovsoft.smartyoutubetv2.common.misc.MotherActivity;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.utils.Utils;
|
import com.liskovsoft.smartyoutubetv2.common.utils.Utils;
|
||||||
@ -468,4 +471,20 @@ public class ViewManager {
|
|||||||
startView(PlaybackView.class);
|
startView(PlaybackView.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BasePresenter<?> getCurrentPresenter() {
|
||||||
|
Class<?> topView = getTopView();
|
||||||
|
|
||||||
|
if (topView == BrowseView.class) {
|
||||||
|
return BrowsePresenter.instance(mContext);
|
||||||
|
} else if (topView == SearchView.class) {
|
||||||
|
return SearchPresenter.instance(mContext);
|
||||||
|
} else if (topView == ChannelView.class) {
|
||||||
|
return ChannelPresenter.instance(mContext);
|
||||||
|
} else if (topView == ChannelUploadsView.class) {
|
||||||
|
return ChannelUploadsPresenter.instance(mContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,9 @@ import com.liskovsoft.smartyoutubetv2.common.app.models.data.VideoGroup;
|
|||||||
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.ui.ChatReceiver;
|
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.ui.ChatReceiver;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.ui.SeekBarSegment;
|
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.ui.SeekBarSegment;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.presenters.PlaybackPresenter;
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.PlaybackPresenter;
|
||||||
|
import com.liskovsoft.smartyoutubetv2.common.app.presenters.base.BasePresenter;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.app.views.PlaybackView;
|
import com.liskovsoft.smartyoutubetv2.common.app.views.PlaybackView;
|
||||||
|
import com.liskovsoft.smartyoutubetv2.common.app.views.ViewManager;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.exoplayer.controller.ExoPlayerController;
|
import com.liskovsoft.smartyoutubetv2.common.exoplayer.controller.ExoPlayerController;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.exoplayer.controller.PlayerController;
|
import com.liskovsoft.smartyoutubetv2.common.exoplayer.controller.PlayerController;
|
||||||
import com.liskovsoft.smartyoutubetv2.common.exoplayer.other.ExoPlayerInitializer;
|
import com.liskovsoft.smartyoutubetv2.common.exoplayer.other.ExoPlayerInitializer;
|
||||||
@ -561,6 +563,10 @@ public class EmbedPlayerView extends PlayerView implements PlaybackView {
|
|||||||
hideView();
|
hideView();
|
||||||
if (mVideo != null) {
|
if (mVideo != null) {
|
||||||
mVideo.embedPlayer = false;
|
mVideo.embedPlayer = false;
|
||||||
|
BasePresenter<?> presenter = ViewManager.instance(getContext()).getCurrentPresenter();
|
||||||
|
if (presenter != null) {
|
||||||
|
presenter.syncItem(mVideo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user