public final class MediaAccessibility
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static CFStringRef |
kMAAudibleMediaSettingsChangedNotification()
[@constant] kMAAudibleMediaSettingsChangedNotification
|
static CFStringRef |
kMACaptionAppearanceSettingsChangedNotification()
[@const] kMACaptionAppearanceSettingsChangedNotification
|
static CFArrayRef |
MAAudibleMediaCopyPreferredCharacteristics()
[@function] MAAudibleMediaCopyPreferredCharacteristics
|
static boolean |
MACaptionAppearanceAddSelectedLanguage(long domain,
CFStringRef language)
——————————————————————————————————————————————————————————————————————————————————————
[@group] Language preferences
——————————————————————————————————————————————————————————————————————————————————————
[@function] MACaptionAppearanceAddSelectedLanguage
|
static CGColorRef |
MACaptionAppearanceCopyBackgroundColor(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
[@function] MACaptionAppearanceCopyBackgroundColor
|
static CTFontDescriptorRef |
MACaptionAppearanceCopyFontDescriptorForStyle(long domain,
org.moe.natj.general.ptr.NIntPtr behavior,
long fontStyle)
——————————————————————————————————————————————————————————————————————————————————————
[@group] Text preferences
——————————————————————————————————————————————————————————————————————————————————————
[@function] MACaptionAppearanceCopyFontForStyle
|
static CGColorRef |
MACaptionAppearanceCopyForegroundColor(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
——————————————————————————————————————————————————————————————————————————————————————
[@group] Color preferences
——————————————————————————————————————————————————————————————————————————————————————
[@function] MACaptionAppearanceCopyForegroundColor
|
static CFArrayRef |
MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics(long domain)
[@function] MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics
|
static CFArrayRef |
MACaptionAppearanceCopySelectedLanguages(long domain)
[@function] MACaptionAppearanceCopySelectedLanguages
|
static CGColorRef |
MACaptionAppearanceCopyWindowColor(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
[@function] MACaptionAppearanceCopyWindowColor
|
static void |
MACaptionAppearanceDidDisplayCaptions(CFArrayRef strings)
[@function] MACaptionAppearanceDidDisplayCaptions
|
static double |
MACaptionAppearanceGetBackgroundOpacity(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
[@function] MACaptionAppearanceGetBackgroundOpacity
|
static long |
MACaptionAppearanceGetDisplayType(long domain)
——————————————————————————————————————————————————————————————————————————————————————
[@group] General preferences
——————————————————————————————————————————————————————————————————————————————————————
[@function] MACaptionAppearanceGetDisplayType
|
static double |
MACaptionAppearanceGetForegroundOpacity(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
[@function] MACaptionAppearanceGetForegroundOpacity
|
static double |
MACaptionAppearanceGetRelativeCharacterSize(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
[@function] MACaptionAppearanceGetRelativeCharacterSize
|
static long |
MACaptionAppearanceGetTextEdgeStyle(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
[@function] MACaptionAppearanceGetTextEdgeStyle
|
static double |
MACaptionAppearanceGetWindowOpacity(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
[@function] MACaptionAppearanceGetWindowOpacity
|
static double |
MACaptionAppearanceGetWindowRoundedCornerRadius(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
[@function] MACaptionAppearanceGetWindowRoundedCornerRadius
|
static void |
MACaptionAppearanceSetDisplayType(long domain,
long displayType)
[@function] MACaptionAppearanceSetDisplayType
|
static CFStringRef |
MAImageCaptioningCopyCaption(CFURLRef url,
org.moe.natj.general.ptr.Ptr<CFErrorRef> error)
[@function] MAImageCaptioningCopyCaption
|
static CFStringRef |
MAImageCaptioningCopyMetadataTagPath()
[@function] MAImageCaptioningCopyMetadataTagPath
|
static boolean |
MAImageCaptioningSetCaption(CFURLRef url,
CFStringRef string,
org.moe.natj.general.ptr.Ptr<CFErrorRef> error)
[@function] MAImageCaptioningSetCaption
|
static CFStringRef |
MAMediaCharacteristicDescribesMusicAndSoundForAccessibility()
[@constant] MAMediaCharacteristicDescribesMusicAndSoundForAccessibility
|
static CFStringRef |
MAMediaCharacteristicDescribesVideoForAccessibility()
[@constant] MAMediaCharacteristicDescribesVideoForAccessibility
|
static CFStringRef |
MAMediaCharacteristicTranscribesSpokenDialogForAccessibility()
[@constant] MAMediaCharacteristicTranscribesSpokenDialogForAccessibility
|
public static boolean MACaptionAppearanceAddSelectedLanguage(long domain,
CFStringRef language)
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:
// now update system-wide captioning preferences by registering the language of the option selected by the user
MACaptionAppearanceAddSelectedLanguage(kMACaptionAppearanceDomainUser, (CFStringRef)[[legibleOption locale] localeIdentifier]);
// 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];
domain - Preference domain, see @link MACaptionAppearanceDomain @/linklanguage - Canonical language identifier (see @link CFLocale@/link) of the user's preferred caption language.true if addition was successful. Unsuccessful additions are most liketly the result of invalid language codes.public static CFArrayRef MACaptionAppearanceCopySelectedLanguages(long domain)
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.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.public static long MACaptionAppearanceGetDisplayType(long domain)
User preference representing what type of captions should be displayed
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.public static void MACaptionAppearanceSetDisplayType(long domain,
long displayType)
User preference representing what type of captions should be displayed
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.displayType - Captions display type, see @link MACaptionAppearanceDisplayType @/link.public static CFArrayRef MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics(long domain)
User preference for captioning media characteristic
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.public static CGColorRef MACaptionAppearanceCopyForegroundColor(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
User preference for foreground/text color.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static CGColorRef MACaptionAppearanceCopyBackgroundColor(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
User preference for background color.
The background color is the color behind each caption glyph.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static CGColorRef MACaptionAppearanceCopyWindowColor(long domain, org.moe.natj.general.ptr.NIntPtr behavior)
User preference for window color.
The window color is the color of a box behind all of the caption glyphs.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static double MACaptionAppearanceGetForegroundOpacity(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
User preference for foreground opacity.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static double MACaptionAppearanceGetBackgroundOpacity(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
User preference for background opacity.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static double MACaptionAppearanceGetWindowOpacity(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
User preference for window opacity.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static double MACaptionAppearanceGetWindowRoundedCornerRadius(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
User preference for caption-window corner radius.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static CTFontDescriptorRef MACaptionAppearanceCopyFontDescriptorForStyle(long domain, org.moe.natj.general.ptr.NIntPtr behavior, long fontStyle)
User font preference for the specified style.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)fontStyle - Font style, see @link MACaptionAppearanceFontStyle @/link.public static double MACaptionAppearanceGetRelativeCharacterSize(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
User preference for font scaling.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static long MACaptionAppearanceGetTextEdgeStyle(long domain,
org.moe.natj.general.ptr.NIntPtr behavior)
User preference for text edge style.
domain - Preference domain, see @link MACaptionAppearanceDomain @/link.*behavior - (see @link MACaptionAppearanceBehavior @/link)public static CFArrayRef MAAudibleMediaCopyPreferredCharacteristics()
User preference for audible media characteristic
public static CFStringRef kMACaptionAppearanceSettingsChangedNotification()
CFNotification sent when any user-defined captioning settings are changed.
public static CFStringRef 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.
public static CFStringRef 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.
public static CFStringRef kMAAudibleMediaSettingsChangedNotification()
CFNotification sent when any user-defined audible media settings are changed.
public static CFStringRef MAMediaCharacteristicDescribesVideoForAccessibility()
A media characteristic that indicates that a track or media selection option includes audible content that descries a video for accessibility.
public static void MACaptionAppearanceDidDisplayCaptions(CFArrayRef strings)
Called by clients to inform accessibility products that captions have been displayed onscreen.
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.public static CFStringRef MAImageCaptioningCopyCaption(CFURLRef url, org.moe.natj.general.ptr.Ptr<CFErrorRef> error)
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.
url - The URL locating the image on disk.error - If an error occurs, a description will be provided.public static boolean MAImageCaptioningSetCaption(CFURLRef url, CFStringRef string, org.moe.natj.general.ptr.Ptr<CFErrorRef> error)
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.
url - The URL locating the image on disk.error - If an error occurs, a description will be provided.string - The accessility caption.public static CFStringRef 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.