File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ protected void init(Context context) {
280280 return ;
281281 mScreenWidth = mContext .getResources ().getDisplayMetrics ().widthPixels ;
282282 mScreenHeight = mContext .getResources ().getDisplayMetrics ().heightPixels ;
283-
283+
284284 // 初始化音频焦点管理器
285285 initAudioFocusManager ();
286286
@@ -354,12 +354,12 @@ protected void startPrepare() {
354354 getGSYVideoManager ().setListener (this );
355355 getGSYVideoManager ().setPlayTag (mPlayTag );
356356 getGSYVideoManager ().setPlayPosition (mPlayPosition );
357-
357+
358358 // 请求音频焦点
359359 if (mAudioFocusManager != null ) {
360360 mAudioFocusManager .requestAudioFocus ();
361361 }
362-
362+
363363 try {
364364 if (mContext instanceof Activity ) {
365365 ((Activity ) mContext ).getWindow ().addFlags (WindowManager .LayoutParams .FLAG_KEEP_SCREEN_ON );
@@ -623,7 +623,7 @@ public void onAutoCompletion() {
623623
624624 if (!mIfCurrentIsFullscreen )
625625 getGSYVideoManager ().setLastListener (null );
626-
626+
627627 // 安全地放弃音频焦点
628628 if (mAudioFocusManager != null ) {
629629 mAudioFocusManager .abandonAudioFocus ();
@@ -1134,7 +1134,7 @@ public void setShowPauseCover(boolean showPauseCover) {
11341134 */
11351135 public void seekTo (long position ) {
11361136 try {
1137- if (getGSYVideoManager () != null && position > 0 ) {
1137+ if (getGSYVideoManager () != null && position >= 0 ) {
11381138 getGSYVideoManager ().seekTo (position );
11391139 }
11401140 } catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments