@nativescript-community/audio
    Preparing search index...

    Interface AudioPlayerOptions

    interface AudioPlayerOptions {
        active?: boolean;
        audioFile: string;
        audioMixing?: boolean;
        audioStreamType?: number;
        autoPlay?: boolean;
        completeCallback?: Function;
        dataSource?: MediaDataSource;
        errorCallback?: Function;
        infoCallback?: Function;
        loop: boolean;
        metering?: boolean;
        pitch?: number;
        seek?: number;
        sessionCategory?: string;
        sessionCategoryOptions?: number;
        sessionMode?: string;
        sessionRouteSharingPolicy?: AVAudioSessionRouteSharingPolicy;
    }
    Index

    Properties

    active?: boolean
    audioFile: string

    The audio file to play.

    audioMixing?: boolean

    Should mix audio.

    audioStreamType?: number

    Android: Used to determine volume source on android < 26. Otherwise use contentType option while creating the player. https://developer.android.com/reference/android/media/MediaPlayer#setAudioStreamType(int)

    autoPlay?: boolean

    Prevent autoplay if desired as player autoplays be default

    completeCallback?: Function

    Callback to execute when playback has completed.

    An object containing the native values for the callback.

    dataSource?: MediaDataSource

    Android: custom player datasource.

    errorCallback?: Function

    Callback to execute when playback has an error.

    An object containing the native values for the error callback.

    infoCallback?: Function

    Callback to execute when info is emitted from the player.

    An object containing the native values for the info callback.

    loop: boolean

    Set true to loop audio playback.

    metering?: boolean

    Set true to enable audio metering.

    pitch?: number
    seek?: number

    start at a specific position

    sessionCategory?: string

    iOS: The category for playing recorded music or other sounds that are central to the successful use of your app. https://developer.apple.com/documentation/avfaudio/avaudiosessioncategory?language=objc

    sessionCategoryOptions?: number

    iOS: The set of options associated with the current audio session category. https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions-swift.property?language=objc

    sessionMode?: string
    sessionRouteSharingPolicy?: AVAudioSessionRouteSharingPolicy

    iOS: Cases that indicate the possible route-sharing policies for an audio session. https://developer.apple.com/documentation/avfaudio/avaudiosessionroutesharingpolicy