SourceErrorEvent

@objcMembers
@objc(BMPSourceErrorEvent)
public class SourceErrorEvent : NSObject, SourceEvent, @unchecked Sendable

See SourceListener for more information on this event.

Possible error codes for SourceErrorEvent:

Code Description
2001 A general source error code when a more specific error code could not be determined.
2101 Failed to start playing the source.
2202 Failed to download playlist.
2301 A general error indicating that the current DRM session failed for some reason. The message of the according SourceErrorEvent provides more information.
2302 The required DRM configuration is missing.
2303 No DRM license URL provided.
2306 The response to the DRM license request failed with an invalid HTTP response code. The message of the according SourceErrorEvent provides more information.
2307 The response to the DRM certificate request failed with an invalid HTTP response code. The message of the according SourceErrorEvent provides more information.
2309 No DRM certificate URL provided.

All other error codes are provided by OS frameworks such as CoreMedia, AVFoundation, CFNetworking etc. These error codes can be negative values and many of them are not documented by Apple.

  • Declaration

    Swift

    public let name: String
  • The error code represented as enum value.

    Declaration

    Swift

    @available(*, deprecated, message: "Use `errorCode` instead to have a more detailed error code")
    public let code: SourceError.Code
  • The raw error code represented as Integer. See documentation of SourceErrorEvent for possible error codes.

    Declaration

    Swift

    public let errorCode: Int
  • Message associated with the error event.

    Declaration

    Swift

    public let message: String
  • The time at which this event was emitted.

    Declaration

    Swift

    public let timestamp: TimeInterval
  • Additional deficiency data if any.

    Declaration

    Swift

    public let data: DeficiencyData?
  • Declaration

    Swift

    public convenience init(code: SourceError.Code, message: String, data: DeficiencyData?)
  • Declaration

    Swift

    public init(code: SourceError.Code, errorCode: Int, message: String, data: DeficiencyData?)