Package apple.mediaaccessibility.c
Class MediaAccessibility
- java.lang.Object
-
- apple.mediaaccessibility.c.MediaAccessibility
-
public final class MediaAccessibility extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull CFStringRefkMAAudibleMediaSettingsChangedNotification()[@constant] kMAAudibleMediaSettingsChangedNotification CFNotification sent when any user-defined audible media settings are changed.static @NotNull CFStringRefkMACaptionAppearanceSettingsChangedNotification()[@const] kMACaptionAppearanceSettingsChangedNotification CFNotification sent when any user-defined captioning settings are changed.static @NotNull CFStringRefkMADimFlashingLightsChangedNotification()[@constant] kMADimFlashingLightsChangedNotification CFNotification sent to local notification center when mitigation for flashing or strobing lights settings are changed.static @NotNull CFArrayRefMAAudibleMediaCopyPreferredCharacteristics()[@function] MAAudibleMediaCopyPreferredCharacteristics User preference for audible media characteristicstatic booleanMACaptionAppearanceAddSelectedLanguage(long domain, @NotNull CFStringRef language)—————————————————————————————————————————————————————————————————————————————————————— [@group] Language preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceAddSelectedLanguage Adds a user's selected caption language to stack of languages.static @NotNull CGColorRefMACaptionAppearanceCopyBackgroundColor(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)[@function] MACaptionAppearanceCopyBackgroundColor User preference for background color.static @NotNull CTFontDescriptorRefMACaptionAppearanceCopyFontDescriptorForStyle(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior, long fontStyle)—————————————————————————————————————————————————————————————————————————————————————— [@group] Text preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceCopyFontForStyle User font preference for the specified style.static @NotNull CGColorRefMACaptionAppearanceCopyForegroundColor(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)—————————————————————————————————————————————————————————————————————————————————————— [@group] Color preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceCopyForegroundColor User preference for foreground/text color.static @NotNull CFArrayRefMACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics(long domain)[@function] MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics User preference for captioning media characteristicstatic @NotNull CFArrayRefMACaptionAppearanceCopySelectedLanguages(long domain)[@function] MACaptionAppearanceCopySelectedLanguages Copies the user's preferred caption languages.static @NotNull CGColorRefMACaptionAppearanceCopyWindowColor(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)[@function] MACaptionAppearanceCopyWindowColor User preference for window color.static voidMACaptionAppearanceDidDisplayCaptions(@NotNull CFArrayRef strings)[@function] MACaptionAppearanceDidDisplayCaptions Called by clients to inform accessibility products that captions have been displayed onscreen.static doubleMACaptionAppearanceGetBackgroundOpacity(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)[@function] MACaptionAppearanceGetBackgroundOpacity User preference for background opacity.static longMACaptionAppearanceGetDisplayType(long domain)—————————————————————————————————————————————————————————————————————————————————————— [@group] General preferences —————————————————————————————————————————————————————————————————————————————————————— [@function] MACaptionAppearanceGetDisplayType User preference representing what type of captions should be displayedstatic doubleMACaptionAppearanceGetForegroundOpacity(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)[@function] MACaptionAppearanceGetForegroundOpacity User preference for foreground opacity.static doubleMACaptionAppearanceGetRelativeCharacterSize(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)[@function] MACaptionAppearanceGetRelativeCharacterSize User preference for font scaling.static longMACaptionAppearanceGetTextEdgeStyle(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)[@function] MACaptionAppearanceGetTextEdgeStyle User preference for text edge style.static doubleMACaptionAppearanceGetWindowOpacity(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)[@function] MACaptionAppearanceGetWindowOpacity User preference for window opacity.static doubleMACaptionAppearanceGetWindowRoundedCornerRadius(long domain, @Nullable org.moe.natj.general.ptr.NIntPtr behavior)[@function] MACaptionAppearanceGetWindowRoundedCornerRadius User preference for caption-window corner radius.static voidMACaptionAppearanceSetDisplayType(long domain, long displayType)[@function] MACaptionAppearanceSetDisplayType User preference representing what type of captions should be displayedstatic booleanMADimFlashingLightsEnabled()[@function] MADimFlashingLightsEnabled Returns whether the user has enabled the setting to reduce flashing or strobing lights in video content.static @Nullable CFStringRefMAImageCaptioningCopyCaption(@NotNull CFURLRef url, @Nullable org.moe.natj.general.ptr.Ptr<CFErrorRef> error)[@function] MAImageCaptioningCopyCaption Returns an accessibility caption from an image's metadata.static @NotNull CFStringRefMAImageCaptioningCopyMetadataTagPath()[@function] MAImageCaptioningCopyMetadataTagPath Returns the metadata tagpath for this key.static booleanMAImageCaptioningSetCaption(@NotNull CFURLRef url, @Nullable CFStringRef string, @Nullable org.moe.natj.general.ptr.Ptr<CFErrorRef> error)[@function] MAImageCaptioningSetCaption Sets the accessibility caption into an image's metadata.static @NotNull CFStringRefMAMediaCharacteristicDescribesMusicAndSoundForAccessibility()[@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 @NotNull CFStringRefMAMediaCharacteristicDescribesVideoForAccessibility()[@constant] MAMediaCharacteristicDescribesVideoForAccessibility A media characteristic that indicates that a track or media selection option includes audible content that descries a video for accessibility.static @NotNull CFStringRefMAMediaCharacteristicTranscribesSpokenDialogForAccessibility()[@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.
-
-
-
Method Detail
-
MACaptionAppearanceAddSelectedLanguage
public static boolean MACaptionAppearanceAddSelectedLanguage(long domain, @NotNull @NotNull 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]);API-Since: 7.0- Parameters:
domain- Preference domain, see @link MACaptionAppearanceDomain @/linklanguage- Canonical language identifier (see @link CFLocale@/link) of the user's preferred caption language.- Returns:
trueif addition was successful. Unsuccessful additions are most liketly the result of invalid language codes.
-
MACaptionAppearanceCopySelectedLanguages
@NotNull public static @NotNull 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. API-Since: 7.0- 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. API-Since: 7.0
-
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. API-Since: 7.0
-
MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics
@NotNull public static @NotNull 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. API-Since: 7.0
-
MACaptionAppearanceCopyForegroundColor
@NotNull public static @NotNull CGColorRef MACaptionAppearanceCopyForegroundColor(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceCopyBackgroundColor
@NotNull public static @NotNull CGColorRef MACaptionAppearanceCopyBackgroundColor(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceCopyWindowColor
@NotNull public static @NotNull CGColorRef MACaptionAppearanceCopyWindowColor(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceGetForegroundOpacity
public static double MACaptionAppearanceGetForegroundOpacity(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceGetBackgroundOpacity
public static double MACaptionAppearanceGetBackgroundOpacity(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceGetWindowOpacity
public static double MACaptionAppearanceGetWindowOpacity(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceGetWindowRoundedCornerRadius
public static double MACaptionAppearanceGetWindowRoundedCornerRadius(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceCopyFontDescriptorForStyle
@NotNull public static @NotNull CTFontDescriptorRef MACaptionAppearanceCopyFontDescriptorForStyle(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceGetRelativeCharacterSize
public static double MACaptionAppearanceGetRelativeCharacterSize(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MACaptionAppearanceGetTextEdgeStyle
public static long MACaptionAppearanceGetTextEdgeStyle(long domain, @Nullable @Nullable 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. API-Since: 7.0
-
MAAudibleMediaCopyPreferredCharacteristics
@NotNull public static @NotNull CFArrayRef MAAudibleMediaCopyPreferredCharacteristics()
[@function] MAAudibleMediaCopyPreferredCharacteristics User preference for audible media characteristic- Returns:
- An array containing the preferred order of media characteristics for audible media. API-Since: 8.0
-
kMACaptionAppearanceSettingsChangedNotification
@NotNull public static @NotNull CFStringRef kMACaptionAppearanceSettingsChangedNotification()
[@const] kMACaptionAppearanceSettingsChangedNotification CFNotification sent when any user-defined captioning settings are changed.
-
MAMediaCharacteristicDescribesMusicAndSoundForAccessibility
@NotNull public static @NotNull 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. API-Since: 7.0
-
MAMediaCharacteristicTranscribesSpokenDialogForAccessibility
@NotNull public static @NotNull 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. API-Since: 7.0
-
kMAAudibleMediaSettingsChangedNotification
@NotNull public static @NotNull CFStringRef kMAAudibleMediaSettingsChangedNotification()
[@constant] kMAAudibleMediaSettingsChangedNotification CFNotification sent when any user-defined audible media settings are changed.
-
MAMediaCharacteristicDescribesVideoForAccessibility
@NotNull public static @NotNull 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. API-Since: 8.0
-
MACaptionAppearanceDidDisplayCaptions
public static void MACaptionAppearanceDidDisplayCaptions(@NotNull @NotNull 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
@Nullable public static @Nullable CFStringRef MAImageCaptioningCopyCaption(@NotNull @NotNull CFURLRef url, @Nullable @Nullable 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. API-Since: 13.0- 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(@NotNull @NotNull CFURLRef url, @Nullable @Nullable CFStringRef string, @Nullable @Nullable 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. API-Since: 13.0- 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
@NotNull public static @NotNull 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. API-Since: 13.0- Returns:
- A string representing the tag path.
-
MADimFlashingLightsEnabled
public static boolean MADimFlashingLightsEnabled()
[@function] MADimFlashingLightsEnabled Returns whether the user has enabled the setting to reduce flashing or strobing lights in video content. This setting can also be used to determine if UI in playback controls should be shown.- Returns:
- A boolean API-Since: 16.4
-
kMADimFlashingLightsChangedNotification
@NotNull public static @NotNull CFStringRef kMADimFlashingLightsChangedNotification()
[@constant] kMADimFlashingLightsChangedNotification CFNotification sent to local notification center when mitigation for flashing or strobing lights settings are changed. API-Since: 16.4
-
-