Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在activity 里监听不到gsyMediaPlayerListener #1578

Closed
pyp163 opened this issue Nov 5, 2018 · 5 comments
Closed

在activity 里监听不到gsyMediaPlayerListener #1578

pyp163 opened this issue Nov 5, 2018 · 5 comments

Comments

@pyp163
Copy link

pyp163 commented Nov 5, 2018

电视盒子
在activity 里监听不到gsyMediaPlayerListener
videoView.getGSYVideoManager().setListener(gsyMediaPlayerListener);

private GSYMediaPlayerListener gsyMediaPlayerListener = new GSYMediaPlayerListener(){
@OverRide
public void onPrepared() {
LogDog.i("--------onPrepared----------");
}

    @Override
    public void onAutoCompletion() {

    }

    @Override
    public void onCompletion() {

    }

    @Override
    public void onBufferingUpdate(int percent) {
        LogDog.i("--------percent----------"+percent);
    }

    @Override
    public void onSeekComplete() {

    }

    @Override
    public void onError(int what, int extra) {

    }

    @Override
    public void onInfo(int what, int extra) {
        LogDog.i("--------what----------"+what);
    }

    @Override
    public void onVideoSizeChanged() {

    }

    @Override
    public void onBackFullscreen() {

    }

    @Override
    public void onVideoPause() {

    }

    @Override
    public void onVideoResume() {

    }

    @Override
    public void onVideoResume(boolean seek) {

    }
};
@CarGuo
Copy link
Owner

CarGuo commented Nov 5, 2018

不是很理解

@pyp163
Copy link
Author

pyp163 commented Nov 5, 2018

@CarGuo
在播放时videoView.getGSYVideoManager().setListener(gsyMediaPlayerListener);是无效的,
以下方法并没执行
@OverRide
public void onBufferingUpdate(int percent) {
LogDog.i("--------percent----------"+percent);
}
@OverRide
public void onError(int what, int extra) {

}
@Override
public void onInfo(int what, int extra) {
    LogDog.i("--------what----------"+what);
}

@OverRide
public void onCompletion() {

}

我想监听这些方法,来实现我想要功能,由于电视频ui不同,摇控器操作

@CarGuo
Copy link
Owner

CarGuo commented Nov 6, 2018

getGSYVideoManager().setListener(gsyMediaPlayerListener); 方法不是对外公开使用的,
对外公开使用的是videocallback
如果你真的需要,推荐你继承后做自定义

@CarGuo
Copy link
Owner

CarGuo commented Nov 6, 2018

#1302

@pyp163
Copy link
Author

pyp163 commented Nov 6, 2018

@CarGuo 好的,谢谢,我知道该怎么做了

@CarGuo CarGuo closed this as completed Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants