MediaDevice

@objcMembers
public class MediaDevice : NSObject

MediaDevice represents an IOS audio/video device.

  • Label of MediaDevice

    Declaration

    Swift

    public let label: String
  • Type of MediaDevice (ex: Bluetooth Audio, Front Camera)

    Declaration

    Swift

    public let type: MediaDeviceType
  • Audio Information based on iOS native AVAudioSessionPortDescription It will be null when it represent a video device.

    Declaration

    Swift

    public let port: AVAudioSessionPortDescription?
  • List available video capture devices from the hardware

    Declaration

    Swift

    public static func listVideoDevices() -> [MediaDevice]
  • List available VideoCaptureFormat from the video capture device. This methods returns an empty array for MediaDevice that’s not used for video.

    Declaration

    Swift

    public static func listSupportedVideoCaptureFormats(mediaDevice: MediaDevice) -> [VideoCaptureFormat]

    Parameters

    mediaDevice

    Video capture device to query

  • List available VideoCaptureFormat from the video capture device. This methods returns an empty array for MediaDevice that’s not used for video.

    Declaration

    Swift

    public static func listSupportedVideoCaptureFormats(mediaDevice: MediaDevice, videoMaxResolution: VideoResolution) -> [VideoCaptureFormat]

    Parameters

    mediaDevice

    Video capture device to query

  • Declaration

    Swift

    public init(label: String, type: MediaDeviceType)
  • Declaration

    Swift

    public init(label: String, port: AVAudioSessionPortDescription? = nil)
  • Declaration

    Swift

    override public var description: String { get }