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

tableViewCell中的视频加载失败,手机横屏会旋转变成全屏,明明已经设置只有竖屏全屏才允许旋转 #636

Open
xingren66 opened this issue Apr 11, 2024 · 1 comment
Labels

Comments

@xingren66
Copy link

xingren66 commented Apr 11, 2024

必现/偶发?
必现

Demo中是否存在同样的问题?

你期望的结果是什么?
在列表中不要发生旋转全屏播放,只有我点击cell全屏后允许旋转

运行环境
所有

截图

额外的
SJUITableViewDemoViewController8中的代码,修改为不能播放url必现
`- (void)sj_playerNeedPlayNewAssetAtIndexPath:(NSIndexPath *)indexPath {
SJVideoCellViewModel *vm = _models[indexPath.row];

if ( !_player ) {
    _player = [SJVideoPlayer player];
    _player.needsFitOnScreenFirst = YES;
    // 2. 再设置竖屏全屏后, 允许播放器旋转;
    _player.allowsRotationInFitOnScreen = YES;
}
vm.url = [NSURL URLWithString:@"https://news/1607682633450.mp4"];
_player.URLAsset = [[SJVideoPlayerURLAsset alloc] initWithURL:vm.url playModel:[SJPlayModel playModelWithTableView:_tableView indexPath:indexPath superviewSelector:NSSelectorFromString(@"coverImageView")]];
_player.URLAsset.title = vm.mediaTitle.string;

}`

@xingren66 xingren66 added the bug label Apr 11, 2024
@xingren66
Copy link
Author

正常能播放或加载中的视频不会发生旋转

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant