Class MediaAccessibility


  • public final class MediaAccessibility
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CFStringRef kMAAudibleMediaSettingsChangedNotification()
      [@constant] kMAAudibleMediaSettingsChangedNotification CFNotification sent when any user-defined audible media settings are changed.
      static CFStringRef kMACaptionAppearanceSettingsChangedNotification()
      [@const] kMACaptionAppearanceSettingsChangedNotification CFNotification sent when any user-defined captioning settings are changed.
      static CFArrayRef MAAudibleMediaCopyPreferredCharacteristics()
      [@function] MAAudibleMediaCopyPreferredCharacteristics User preference for audible media characteristic
      static boolean MACaptionAppearanceAddSelectedLanguage​(long domain, CFStringRef language)
      —————————————————————————————————————————————————————————————————————————————————————— [@group] Language preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceAddSelectedLanguage Adds a user's selected caption language to stack of languages.
      static CGColorRef MACaptionAppearanceCopyBackgroundColor​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      [@function] MACaptionAppearanceCopyBackgroundColor User preference for background color.
      static CTFontDescriptorRef MACaptionAppearanceCopyFontDescriptorForStyle​(long domain, org.moe.natj.general.ptr.NIntPtr behavior, long fontStyle)
      —————————————————————————————————————————————————————————————————————————————————————— [@group] Text preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceCopyFontForStyle User font preference for the specified style.
      static CGColorRef MACaptionAppearanceCopyForegroundColor​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      —————————————————————————————————————————————————————————————————————————————————————— [@group] Color preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceCopyForegroundColor User preference for foreground/text color.
      static CFArrayRef MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics​(long domain)
      [@function] MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics User preference for captioning media characteristic
      static CFArrayRef MACaptionAppearanceCopySelectedLanguages​(long domain)
      [@function] MACaptionAppearanceCopySelectedLanguages Copies the user's preferred caption languages.
      static CGColorRef MACaptionAppearanceCopyWindowColor​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      [@function] MACaptionAppearanceCopyWindowColor User preference for window color.
      static void MACaptionAppearanceDidDisplayCaptions​(CFArrayRef strings)
      [@function] MACaptionAppearanceDidDisplayCaptions Called by clients to inform accessibility products that captions have been displayed onscreen.
      static double MACaptionAppearanceGetBackgroundOpacity​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      [@function] MACaptionAppearanceGetBackgroundOpacity User preference for background opacity.
      static long MACaptionAppearanceGetDisplayType​(long domain)
      —————————————————————————————————————————————————————————————————————————————————————— [@group] General preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceGetDisplayType User preference representing what type of captions should be displayed
      static double MACaptionAppearanceGetForegroundOpacity​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      [@function] MACaptionAppearanceGetForegroundOpacity User preference for foreground opacity.
      static double MACaptionAppearanceGetRelativeCharacterSize​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      [@function] MACaptionAppearanceGetRelativeCharacterSize User preference for font scaling.
      static long MACaptionAppearanceGetTextEdgeStyle​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      [@function] MACaptionAppearanceGetTextEdgeStyle User preference for text edge style.
      static double MACaptionAppearanceGetWindowOpacity​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      [@function] MACaptionAppearanceGetWindowOpacity User preference for window opacity.
      static double MACaptionAppearanceGetWindowRoundedCornerRadius​(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
      [@function] MACaptionAppearanceGetWindowRoundedCornerRadius User preference for caption-window corner radius.
      static void MACaptionAppearanceSetDisplayType​(long domain, long displayType)
      [@function] MACaptionAppearanceSetDisplayType User preference representing what type of captions should be displayed
      static CFStringRef MAImageCaptioningCopyCaption​(CFURLRef url, org.moe.natj.general.ptr.Ptr<CFErrorRef> error)
      [@function] MAImageCaptioningCopyCaption Returns an accessibility caption from an image's metadata.
      static CFStringRef MAImageCaptioningCopyMetadataTagPath()
      [@function] MAImageCaptioningCopyMetadataTagPath Returns the metadata tagpath for this key.
      static boolean MAImageCaptioningSetCaption​(CFURLRef url, CFStringRef string, org.moe.natj.general.ptr.Ptr<CFErrorRef> error)
      [@function] MAImageCaptioningSetCaption Sets the accessibility caption into an image's metadata.
      static CFStringRef MAMediaCharacteristicDescribesMusicAndSoundForAccessibility()
      [@constant] MAMediaCharacteristicDescribesMusicAndSoundForAccessibility A media characteristic that indicates that a track or media selection option includes legible content in the language of its specified locale that: - describes music and - describes sound other than spoken dialog, such as sound effects and significant silences, occurring in program audio.
      static CFStringRef MAMediaCharacteristicDescribesVideoForAccessibility()
      [@constant] MAMediaCharacteristicDescribesVideoForAccessibility A media characteristic that indicates that a track or media selection option includes audible content that descries a video for accessibility.
      static CFStringRef MAMediaCharacteristicTranscribesSpokenDialogForAccessibility()
      [@constant] MAMediaCharacteristicTranscribesSpokenDialogForAccessibility A media characteristic that indicates that a track or media selection option includes legible content in the language of its specified locale that: - transcribes spoken dialog and - identifies speakers whenever other visual cues are insufficient for a viewer to determine who is speaking.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • MACaptionAppearanceAddSelectedLanguage

        public static boolean MACaptionAppearanceAddSelectedLanguage​(long domain,
                                                                     CFStringRef language)
        —————————————————————————————————————————————————————————————————————————————————————— [@group] Language preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceAddSelectedLanguage Adds a user's selected caption language to stack of languages. After a language is added it will appear first in the array returned by MACaptionAppearanceCopySelectedLanguages. Applications should call this anytime a user selects a specific languages for captioning tracks. For example, an AVFoundation clients may execute the following code in response to a user selecting a captioning track: // in response to a user selection (from a pop-up menu or any other UI affordance), make the selection effective -[AVPlayerItem selectMediaOption:legibleOption inMediaSelectionGroup:legibleGroup]; // now update system-wide captioning preferences by registering the language of the option selected by the user MACaptionAppearanceAddSelectedLanguage(kMACaptionAppearanceDomainUser, (CFStringRef)[[legibleOption locale] localeIdentifier]);
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link
        language - Canonical language identifier (see @link CFLocale@/link) of the user's preferred caption language.
        Returns:
        true if addition was successful. Unsuccessful additions are most liketly the result of invalid language codes.
      • MACaptionAppearanceCopySelectedLanguages

        public static CFArrayRef MACaptionAppearanceCopySelectedLanguages​(long domain)
        [@function] MACaptionAppearanceCopySelectedLanguages Copies the user's preferred caption languages. Languages added using MACaptionAppearanceAddSelectedLanguage are normalized, and thus the contents of this array may have slightly different strings than those passed into MACaptionAppearanceAddSelectedLanguage.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        Ordered array of preferred canonical language identifiers.
      • MACaptionAppearanceGetDisplayType

        public static long MACaptionAppearanceGetDisplayType​(long domain)
        —————————————————————————————————————————————————————————————————————————————————————— [@group] General preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceGetDisplayType User preference representing what type of captions should be displayed
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference representing what type of captions should be displayed. See @link MACaptionAppearanceDisplayType @/link.
      • MACaptionAppearanceSetDisplayType

        public static void MACaptionAppearanceSetDisplayType​(long domain,
                                                             long displayType)
        [@function] MACaptionAppearanceSetDisplayType User preference representing what type of captions should be displayed
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        displayType - Captions display type, see @link MACaptionAppearanceDisplayType @/link.
      • MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics

        public static CFArrayRef MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics​(long domain)
        [@function] MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics User preference for captioning media characteristic
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        An array containing the preferred order of media characteristics for captions.
      • MACaptionAppearanceCopyForegroundColor

        public static CGColorRef MACaptionAppearanceCopyForegroundColor​(long domain,
                                                                        org.moe.natj.general.ptr.NIntPtr behavior)
        —————————————————————————————————————————————————————————————————————————————————————— [@group] Color preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceCopyForegroundColor User preference for foreground/text color.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference for foreground/text color.
      • MACaptionAppearanceCopyBackgroundColor

        public static CGColorRef MACaptionAppearanceCopyBackgroundColor​(long domain,
                                                                        org.moe.natj.general.ptr.NIntPtr behavior)
        [@function] MACaptionAppearanceCopyBackgroundColor User preference for background color. The background color is the color behind each caption glyph.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference for background color.
      • MACaptionAppearanceCopyWindowColor

        public static CGColorRef MACaptionAppearanceCopyWindowColor​(long domain,
                                                                    org.moe.natj.general.ptr.NIntPtr behavior)
        [@function] MACaptionAppearanceCopyWindowColor User preference for window color. The window color is the color of a box behind all of the caption glyphs.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference for window color.
      • MACaptionAppearanceGetForegroundOpacity

        public static double MACaptionAppearanceGetForegroundOpacity​(long domain,
                                                                     org.moe.natj.general.ptr.NIntPtr behavior)
        [@function] MACaptionAppearanceGetForegroundOpacity User preference for foreground opacity.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference for foreground opacity.
      • MACaptionAppearanceGetBackgroundOpacity

        public static double MACaptionAppearanceGetBackgroundOpacity​(long domain,
                                                                     org.moe.natj.general.ptr.NIntPtr behavior)
        [@function] MACaptionAppearanceGetBackgroundOpacity User preference for background opacity.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference for background opacity.
      • MACaptionAppearanceGetWindowOpacity

        public static double MACaptionAppearanceGetWindowOpacity​(long domain,
                                                                 org.moe.natj.general.ptr.NIntPtr behavior)
        [@function] MACaptionAppearanceGetWindowOpacity User preference for window opacity.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference for window opacity.
      • MACaptionAppearanceGetWindowRoundedCornerRadius

        public static double MACaptionAppearanceGetWindowRoundedCornerRadius​(long domain,
                                                                             org.moe.natj.general.ptr.NIntPtr behavior)
        [@function] MACaptionAppearanceGetWindowRoundedCornerRadius User preference for caption-window corner radius.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference for caption-window corner radius.
      • MACaptionAppearanceCopyFontDescriptorForStyle

        public static CTFontDescriptorRef MACaptionAppearanceCopyFontDescriptorForStyle​(long domain,
                                                                                        org.moe.natj.general.ptr.NIntPtr behavior,
                                                                                        long fontStyle)
        —————————————————————————————————————————————————————————————————————————————————————— [@group] Text preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceCopyFontForStyle User font preference for the specified style.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        fontStyle - Font style, see @link MACaptionAppearanceFontStyle @/link.
        Returns:
        User font preference for the specified style.
      • MACaptionAppearanceGetRelativeCharacterSize

        public static double MACaptionAppearanceGetRelativeCharacterSize​(long domain,
                                                                         org.moe.natj.general.ptr.NIntPtr behavior)
        [@function] MACaptionAppearanceGetRelativeCharacterSize User preference for font scaling.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User font scaling preference for the specified style.
      • MACaptionAppearanceGetTextEdgeStyle

        public static long MACaptionAppearanceGetTextEdgeStyle​(long domain,
                                                               org.moe.natj.general.ptr.NIntPtr behavior)
        [@function] MACaptionAppearanceGetTextEdgeStyle User preference for text edge style.
        Parameters:
        domain - Preference domain, see @link MACaptionAppearanceDomain @/link.
        Returns:
        User preference for text edge style.
      • MAAudibleMediaCopyPreferredCharacteristics

        public static CFArrayRef MAAudibleMediaCopyPreferredCharacteristics()
        [@function] MAAudibleMediaCopyPreferredCharacteristics User preference for audible media characteristic
        Returns:
        An array containing the preferred order of media characteristics for audible media.
      • kMACaptionAppearanceSettingsChangedNotification

        public static CFStringRef kMACaptionAppearanceSettingsChangedNotification()
        [@const] kMACaptionAppearanceSettingsChangedNotification CFNotification sent when any user-defined captioning settings are changed.
      • MAMediaCharacteristicDescribesMusicAndSoundForAccessibility

        public static CFStringRef MAMediaCharacteristicDescribesMusicAndSoundForAccessibility()
        [@constant] MAMediaCharacteristicDescribesMusicAndSoundForAccessibility A media characteristic that indicates that a track or media selection option includes legible content in the language of its specified locale that: - describes music and - describes sound other than spoken dialog, such as sound effects and significant silences, occurring in program audio. Legible tracks provided for accessibility purposes are typically tagged both with this characteristic as well as with MAMediaCharacteristicTranscribesSpokenDialogForAccessibility. A legible track provided for accessibility purposes that's associated with an audio track without music and without sound other than spoken dialog -- lacking even significant silences -- can be tagged with this characteristic, because it trivially meets these requirements.
      • MAMediaCharacteristicTranscribesSpokenDialogForAccessibility

        public static CFStringRef MAMediaCharacteristicTranscribesSpokenDialogForAccessibility()
        [@constant] MAMediaCharacteristicTranscribesSpokenDialogForAccessibility A media characteristic that indicates that a track or media selection option includes legible content in the language of its specified locale that: - transcribes spoken dialog and - identifies speakers whenever other visual cues are insufficient for a viewer to determine who is speaking. Legible tracks provided for accessibility purposes are typically tagged both with this characteristic as well as with MAMediaCharacteristicDescribesMusicAndSoundForAccessibility. A legible track provided for accessibility purposes that's associated with an audio track that has no spoken dialog can be tagged with this characteristic, because it trivially meets these requirements.
      • kMAAudibleMediaSettingsChangedNotification

        public static CFStringRef kMAAudibleMediaSettingsChangedNotification()
        [@constant] kMAAudibleMediaSettingsChangedNotification CFNotification sent when any user-defined audible media settings are changed.
      • MAMediaCharacteristicDescribesVideoForAccessibility

        public static CFStringRef MAMediaCharacteristicDescribesVideoForAccessibility()
        [@constant] MAMediaCharacteristicDescribesVideoForAccessibility A media characteristic that indicates that a track or media selection option includes audible content that descries a video for accessibility.
      • MACaptionAppearanceDidDisplayCaptions

        public static void MACaptionAppearanceDidDisplayCaptions​(CFArrayRef strings)
        [@function] MACaptionAppearanceDidDisplayCaptions Called by clients to inform accessibility products that captions have been displayed onscreen.
        Parameters:
        strings - An array of CFStringRef or CFAttributedStringRef objects that represent the text that is being displayed. An empty array is used to indicate that no captions are being displayed.
      • MAImageCaptioningCopyCaption

        public static CFStringRef MAImageCaptioningCopyCaption​(CFURLRef url,
                                                               org.moe.natj.general.ptr.Ptr<CFErrorRef> error)
        [@function] MAImageCaptioningCopyCaption Returns an accessibility caption from an image's metadata. A convenience function for retrieving a caption from an image file that aims to describe the photo accurately. This checks for XMP metadata field: Iptc4xmpExt:AOContentDescription.
        Parameters:
        url - The URL locating the image on disk.
        error - If an error occurs, a description will be provided.
        Returns:
        A string with the image caption. Nil if there's no caption.
      • MAImageCaptioningSetCaption

        public static boolean MAImageCaptioningSetCaption​(CFURLRef url,
                                                          CFStringRef string,
                                                          org.moe.natj.general.ptr.Ptr<CFErrorRef> error)
        [@function] MAImageCaptioningSetCaption Sets the accessibility caption into an image's metadata. A convenience function for setting a caption to an image file that aims to describe the photo accurately. This sets the XMP metadata field: Iptc4xmpExt:AOContentDescription.
        Parameters:
        url - The URL locating the image on disk.
        error - If an error occurs, a description will be provided.
        string - The accessility caption.
        Returns:
        A bool representing whether the operation was successful.
      • MAImageCaptioningCopyMetadataTagPath

        public static CFStringRef MAImageCaptioningCopyMetadataTagPath()
        [@function] MAImageCaptioningCopyMetadataTagPath Returns the metadata tagpath for this key. This tag path can be used to copy metadata directly using CGImageMetadataCopyTagWithPath from the CGImageMetadataRef, for example. This returns the appropriate metadata tag path to be used.
        Returns:
        A string representing the tag path.