PKPlugin

@objc
public protocol PKPlugin

The PKPlugin protocol defines all the properties and methods required to define a plugin object.

  • The plugin name.

    Declaration

    Swift

    static var pluginName: String { get }
  • The player associated with the plugin

    Declaration

    Swift

    weak var player: Player? { get }
  • The messageBus associated with the plugin

    Declaration

    Swift

    weak var messageBus: MessageBus? { get }
  • On first load. used for doing initialization for the first time with the media config.

    Declaration

    Swift

    init(player: Player, pluginConfig: Any?, messageBus: MessageBus) throws
  • On update media. used to update the plugin with new media config when available.

    Declaration

    Swift

    func onUpdateMedia(mediaConfig: MediaConfig)
  • On update config. used to update the plugin config.

    Declaration

    Swift

    func onUpdateConfig(pluginConfig: Any)
  • Called on player destroy.

    Declaration

    Swift

    func destroy()