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

希望能给出一个ali播放器的封装DEMO #1292

Open
xslgithub opened this issue Feb 22, 2022 · 9 comments
Open

希望能给出一个ali播放器的封装DEMO #1292

xslgithub opened this issue Feb 22, 2022 · 9 comments

Comments

@xslgithub
Copy link

No description provided.

@renzifeng
Copy link
Owner

自己按照协议实现一下就行

@xslgithub
Copy link
Author

按协议弄了,画面出不来
:(

@lilin87788
Copy link

按协议弄了,画面出不来
:(
你写好了吗,作者有没有实现协议的demo,我也想自己搞一下

@xslgithub
Copy link
Author

自己可参考AVPlayerManager,或者IJKPlayerManager封装

@ioslhf
Copy link

ioslhf commented Mar 17, 2022

@xslgithub 你好,你的阿里播放器弄了吗

@xslgithub
Copy link
Author

@xslgithub 你好,你的阿里播放器弄了吗

弄了画面出不来,属于是无效弄.....

@lilin87788
Copy link

自己可参考AVPlayerManager,或者IJKPlayerManager封装

好的谢谢我也看看

@FengXJ
Copy link

FengXJ commented Apr 21, 2022

  • (void)initializePlayer {
    if (self.player) {
    [self.player stop];
    }

    AVPUrlSource *urlSource = [[AVPUrlSource alloc] urlWithString:[NSString stringWithFormat:@"%@",self.assetURL]];
    [self.player setUrlSource:urlSource];
    self.player.playerView = [[UIView alloc]init];
    self.view.playerView = self.player.playerView;
    self.player.autoPlay = self.shouldAutoPlay;
    [self.player prepare];
    self.scalingMode = self->_scalingMode;
    }

self.player.playerView = [[UIView alloc]init];
ijkdemo是生成个播放视图,阿里云是设置视图 你试试这样

@xslgithub
Copy link
Author

  • (void)initializePlayer {
    if (self.player) {
    [self.player stop];
    }
    AVPUrlSource *urlSource = [[AVPUrlSource alloc] urlWithString:[NSString stringWithFormat:@"%@",self.assetURL]];
    [self.player setUrlSource:urlSource];
    self.player.playerView = [[UIView alloc]init];
    self.view.playerView = self.player.playerView;
    self.player.autoPlay = self.shouldAutoPlay;
    [self.player prepare];
    self.scalingMode = self->_scalingMode;
    }

self.player.playerView = [[UIView alloc]init]; ijkdemo是生成个播放视图,阿里云是设置视图 你试试这样

画面出来了 , 我之前是在生成 manager对象的时候 再去设置视图的,结果出不来...
这为啥随便一个空的视图 都可以展示画面

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

5 participants