We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Improve test apps for Media for Edge Network extension with examples for:
func detectCCChange() { guard let currentItem = self.player.currentItem else { return } let asset = currentItem.asset if #available(iOS 15.0, *) { asset.loadMediaSelectionGroup(for: AVMediaCharacteristic.legible, completionHandler: { group, _ in guard let group = group else { return } self.detectCCStatus(item: currentItem, group: group) }) } else { guard let group = asset.mediaSelectionGroup(forMediaCharacteristic: AVMediaCharacteristic.legible) else { return } detectCCStatus(item: currentItem, group: group) } } func detectCCStatus(item: AVPlayerItem, group: AVMediaSelectionGroup) { let option = item.currentMediaSelection.selectedMediaOption(in: group) let ccActive = (option != nil) if self._isCCActive != ccActive { self._isCCActive = ccActive var info: [String: Any] = [:] info["ccActive"] = self._isCCActive NotificationCenter.default.post(name: NSNotification.Name(rawValue: PlayerEvent.PLAYER_EVENT_CC_CHANGE), object: self, userInfo: info) } }func detectCCChange() { guard let currentItem = self.player.currentItem else { return } let asset = currentItem.asset if #available(iOS 15.0, *) { asset.loadMediaSelectionGroup(for: AVMediaCharacteristic.legible, completionHandler: { group, _ in guard let group = group else { return } self.detectCCStatus(item: currentItem, group: group) }) } else { guard let group = asset.mediaSelectionGroup(forMediaCharacteristic: AVMediaCharacteristic.legible) else { return } detectCCStatus(item: currentItem, group: group) } } func detectCCStatus(item: AVPlayerItem, group: AVMediaSelectionGroup) { let option = item.currentMediaSelection.selectedMediaOption(in: group) let ccActive = (option != nil) if self._isCCActive != ccActive { self._isCCActive = ccActive var info: [String: Any] = [:] info["ccActive"] = self._isCCActive NotificationCenter.default.post(name: NSNotification.Name(rawValue: PlayerEvent.PLAYER_EVENT_CC_CHANGE), object: self, userInfo: info) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Task description
Improve test apps for Media for Edge Network extension with examples for:
Additional implementation details or code snippet(s)
The text was updated successfully, but these errors were encountered: