error void onCompletion
Closed this issue · 5 comments
hi
my problem.. after clicking icon error auto close windows
I want change action "auto close windows" to try playing again after click icon
after add code .. get error
@OverRide
public void onCompletion() {
if (mCurrentState == CURRENT_STATE_ERROR) {
// add the logic you need
}
if ("quit fullscreen") {
super.onCompletion();
}
}
what problem?
can write code for try play video again
i use simple project https://github.com/henryblue/MxVideoPlayer/tree/master/app
this all file lib ..what file edit
Thanks a lot
the code is only tip, "quit fullscreen" is also only code annotation. You can change it as follows:
boolean mIsQuitFullscreen = false;
@OverRide
public void onCompletion() {
if (mIsQuitFullscreen) {
super.onCompletion();
} else {
// what you want to do
}
}
@Override
public boolean quitFullscreenOrTinyListener() {
mIsQuitFullscreen = true;
boolean result = super.quitFullscreenOrTinyListener();
mIsQuitFullscreen = false;
return result;
}
This will still have some problems, i will fix this bug in the next version.
About "how fill screen ? no need black background", you can do that:
@OverRide
public void onVideoSizeChanged() {
MxMediaManager.getInstance().mCurVideoWidth = getMeasuredWidth();
MxMediaManager.getInstance().mCurVideoHeight = getMeasuredHeight();
super.onVideoSizeChanged();
}
About "after click button back .. back 2 activity auto ..me click one only".
I do not understand what you mean, hope you can describe in detail
About "after click button back.. back 2 activity auto.. me click one only". The fix has done..
Another question ..
after use
public void onVideoSizeChanged() {
MxMediaManager.getInstance().mCurVideoWidth = getMeasuredWidth();
MxMediaManager.getInstance().mCurVideoHeight = getMeasuredHeight();
super.onVideoSizeChanged();
}
work for landscape and portrait screen.. I want to work in landscape only and portrait work for default Size.. can do this ?
Thanks a lot :)
Unfortunately, it is impossible to achieve all the needs, I do not want the logic of the player is too complicated. You can read the source code to see how to modify. Thanks