This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// JWPlayer+Mute.swift | |
// | |
// Created by Amitai Blickstein on 6/1/22. | |
// | |
import Foundation | |
import JWPlayerKit | |
fileprivate let kVolumeKey = "kVolumeKey" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In a JWPlayerViewController, with player configured, etc. | |
// For example, our BPA: https://github.com/jwplayer/jwplayer-ios-bestPracticeApps | |
// Override the implementation of this JWAdDelegate method, | |
// which reports when any ad event is emitted by the player. | |
override func jwplayer(_ player: AnyObject, adEvent event: JWAdEvent) { | |
super.jwplayer(player, adEvent: event) // When overriding (only), must call the `super` method. | |
if let companions = event[.companions] as? [JWAdCompanion] { | |
handleCompanion(companions.first) | |
} |
OlderNewer