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

同时导入IJKPlayer 和 AliPlayer,然后使用IJKPlayer直接报错 #632

Open
tikejc opened this issue Feb 2, 2024 · 0 comments
Open
Labels

Comments

@tikejc
Copy link

tikejc commented Feb 2, 2024

1、项目中导入了

pod 'SJBaseVideoPlayer/AliPlayer'
pod 'SJBaseVideoPlayer/IJKPlayer'

2、报错位置

#import "SJIJKMediaPlayerLayerView.h"

@implementation SJIJKMediaPlayerLayerView
- (instancetype)initWithPlayer:(SJIJKMediaPlayer *)player {
    self = [super init];
    if ( self ) {
        _player = player;
        [self addSubview:_player.view];
        [self setVideoGravity:AVVideoScalingModeResizeAspect];

        // TODO: 这里直接报错
        [player addObserver:self forKeyPath:@"firstVideoFrameRendered" options:NSKeyValueObservingOptionNew context:NULL];
    }
    return self;
}

3、如果只导入IJKPlayer 不导入 AliPlayer 就能正常工作

@tikejc tikejc added the bug label Feb 2, 2024
@tikejc tikejc changed the title 同时导入IJKPlayer 和 AliPlayer,然后使用IJKPlayer之间报错 同时导入IJKPlayer 和 AliPlayer,然后使用IJKPlayer直接报错 Feb 2, 2024
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