forked from CarGuo/GSYVideoPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/main/java/com/example/gsyvideoplayer/video/ListADVideoPlayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.example.gsyvideoplayer.video; | ||
|
||
import android.content.Context; | ||
import android.util.AttributeSet; | ||
|
||
import com.shuyu.gsyvideoplayer.listener.GSYMediaPlayerListener; | ||
import com.shuyu.gsyvideoplayer.utils.Debuger; | ||
import com.shuyu.gsyvideoplayer.video.GSYADVideoPlayer; | ||
|
||
public class ListADVideoPlayer extends GSYADVideoPlayer { | ||
|
||
public ListADVideoPlayer(Context context, Boolean fullFlag) { | ||
super(context, fullFlag); | ||
} | ||
|
||
public ListADVideoPlayer(Context context) { | ||
super(context); | ||
} | ||
|
||
public ListADVideoPlayer(Context context, AttributeSet attrs) { | ||
super(context, attrs); | ||
} | ||
|
||
@Override | ||
protected void startPrepare() { | ||
GSYMediaPlayerListener listener = getGSYVideoManager().listener(); | ||
super.startPrepare(); | ||
if (listener != null) { | ||
listener.onAutoCompletion(); | ||
} | ||
} | ||
|
||
@Override | ||
public void onAutoCompletion() { | ||
super.onAutoCompletion(); | ||
if (!isCurrentMediaListener() && mVideoAllCallBack != null) { | ||
Debuger.printfLog("onAutoComplete"); | ||
mVideoAllCallBack.onAutoComplete(mOriginUrl, mTitle, this); | ||
} | ||
} | ||
|
||
@Override | ||
public void onCompletion() { | ||
super.onCompletion(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters