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

[[MPMediaItemArtwork alloc] initWithImage:] Adapt to iOS10.0 #41

Merged
merged 2 commits into from
Apr 12, 2021
Merged

[[MPMediaItemArtwork alloc] initWithImage:] Adapt to iOS10.0 #41

merged 2 commits into from
Apr 12, 2021

Conversation

liufannnn
Copy link
Contributor

        if (@available(iOS 10.0, *)) {
            DFPlayerWeakSelf
            MPMediaItemArtwork *artwork = [[MPMediaItemArtwork alloc] initWithBoundsSize:[self.currentAudioInfoModel.audioImage size]
                                                                          requestHandler:^UIImage * _Nonnull(CGSize size) {
                return wSelf.currentAudioInfoModel.audioImage;
            }];
            _remoteInfoDictionary[MPMediaItemPropertyArtwork] = artwork;
        } else {
            MPMediaItemArtwork *artwork = [[MPMediaItemArtwork alloc] initWithImage:self.currentAudioInfoModel.audioImage];
            _remoteInfoDictionary[MPMediaItemPropertyArtwork] = artwork;
        }

@ihoudf ihoudf merged commit d3fc17c into ihoudf:master Apr 12, 2021
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

Successfully merging this pull request may close these issues.

2 participants