iOS Developer Library

Developer

MediaPlayer Framework Reference Media Player Functions Reference

Options
Deployment Target:

On This Page
Language:

Media Player Functions Reference

The Media Player framework defines several functions for use in displaying and hiding volume controls.

Functions

  • Displays an alert panel for controlling the system volume.

    Declaration

    Swift

    func MPVolumeSettingsAlertShow()

    Objective-C

    void MPVolumeSettingsAlertShow ( void );

    Discussion

    The alert panel displayed by this function floats above the contents of the current window. It contains a slider for adjusting the system volume setting and a Done button so that the user can dismiss the panel. You can also dismiss the panel programmatically using the MPVolumeSettingsAlertHide function.

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 2.0 and later.

  • Hides the alert panel that controls the system volume.

    Declaration

    Swift

    func MPVolumeSettingsAlertHide()

    Objective-C

    void MPVolumeSettingsAlertHide ( void );

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 2.0 and later.

  • Returns a Boolean value indicating whether the volume alert panel is currently visible.

    Declaration

    Swift

    func MPVolumeSettingsAlertIsVisible() -> Bool

    Objective-C

    BOOL MPVolumeSettingsAlertIsVisible ( void );

    Return Value

    YEStrue if the volume alert is visible; otherwise, NOfalse.

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 2.0 and later.