QEDMediaCaptureAndPlayViewController

public class QEDMediaCaptureAndPlayViewController : UIViewController

A View Controller providing media capture and playback functionality for locally stored media files.

It will switch automatically between media playback and media recording modes depending on the internal value for the local stored media file.

If a local media file is assigned, the controller will be in playback mode, otherwise in capture mode.

If allowed by the QEDMediaCaptureAndPlayViewControllerDelegate, a user can trigger the deletion of the local stored media file. After deletion the controller will switch to capturing mode automatically.

  • Represent the reason for dismissal request

    See more

    Declaration

    Swift

    public enum DismissReason
  • Represents an Error on the Setup process of the controller.

    See more

    Declaration

    Swift

    public enum SetupError : LocalizedError
  • The type of media presented or captured by the controller

    See more

    Declaration

    Swift

    public enum MediaType : Int
  • Creates a QEDMediaCaptureAndPlayViewController instance for presentation

    The instance provide both capturing and playback of meida content (photos and videos). It will switch automatically between media playback and media capture modes depending on the internal value of fileURL.

    When initialised with a valid fileURL, the controller will start on playback mode when presented and will play automatically if autoplay == true and the media file is a video.

    If fileURL == nil on initialisation, the controller will start on capture mode when presented.

    Declaration

    Swift

    public init(delegate: QEDMediaCaptureAndPlayViewControllerDelegate, directory: URL, fileURL: URL? = nil, autoplay: Bool = false)

    Parameters

    delegate

    A class instance conforming to the QEDMediaCaptureAndPlayViewControllerDelegate protocol. The delegate is not retained

    directory

    A local file directory where to store the newly recorded media files

    fileURL

    An optional URL for a local media file. Defaults to nil

    autoplay

    An indication if the media should autoplay when initialised with an existing local video URL. Defaults to false

  • The default Media type to launch the controller on when started for capture.

    Declaration

    Swift

    public var defaultMediaType: QEDMediaCaptureAndPlayViewController.MediaType