Class: AVTextStyleRule

Inherits:
NSObject show all

Overview

An AVTextStyleRule object represents text styling rules that can be applied to text in a media item. You use text style objects to format subtitles, closed captions, and other text-related content of the item. The rules you specify can be applied to all or part of the text in the media item.

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (Hash) textMarkupAttributes (readonly)

A dictionary of text style attributes to apply to the text. (read-only) The supported keys for this dictionary are defined in CMTextMarkup.h.

Returns:

- (String) textSelector (readonly)

A string that identifies the text to which the attributes should apply. (read-only) The contents of the string are determined by the format of the legible media. For example, the string could contain the CSS selectors used by the corresponding text in Web Video Text Tracks (WebVTT) markup.If the value of this property is nil, the text style attributes apply to all text in the media item.

Returns:

Class Method Details

+ (Object) propertyListForTextStyleRules(textStyleRules)

Converts one or more text style rules into a serializable property list object. The property-list object returned by this method can be written to disk and stored persistently.

Parameters:

Returns:

+ (Array) textStyleRulesFromPropertyList(plist)

Creates an array of text style rule objects from the specified property-list object. Use this method to create new text style rule objects based on data you previously converted to a property-list format using the propertyListForTextStyleRules: class method.

Parameters:

  • plist (Object)

    A property-list object containing the text style data.

Returns:

  • (Array)

    An array of AVTextStyleRule objects corresponding to the style information in the property-list object.

+ (AVTextStyleRule) textStyleRuleWithTextMarkupAttributes(textMarkupAttributes)

Creates and returns a new text style rule object using the style attributes in the specified dictionary. This method sets the textSelector property of the style object to nil, which causes the rules to be applied to all of the text in the media item.

Parameters:

  • textMarkupAttributes (Hash)

    A dictionary of style attributes. For a list of supported keys and values that you can include in this dictionary, see CMTextMarkup.h.

Returns:

  • (AVTextStyleRule)

    A new text style rule object with the specified attributes.

+ (AVTextStyleRule) textStyleRuleWithTextMarkupAttributes(textMarkupAttributes, textSelector:textSelector)

Creates and returns a new text style rule object using the specified style attributes and text range information.

Parameters:

  • textMarkupAttributes (Hash)

    A dictionary of style attributes. For a list of supported keys and values that you can include in this dictionary, see CMTextMarkup.h.

  • textSelector (String)

    A string contains an identifier for the ranges of text to which the style attributes should be applied. Eligible identifiers are determined by the media format and its corresponding text content. For example, the string could contain the CSS selectors used by the corresponding text in Web Video Text Tracks (WebVTT) markup. Specify nil if you want the style attributes to apply to all text in the item.

Returns:

  • (AVTextStyleRule)

    A new text style rule object with the specified attributes and range information.

Instance Method Details

- (Object) initWithTextMarkupAttributes(textMarkupAttributes)

Initializes a text style rule object with the specified style attributes. This method sets the textSelector property of the style object to nil, which causes the rules to be applied to all of the text in the media item.

Parameters:

  • textMarkupAttributes (Hash)

    A dictionary of style attributes. For a list of supported keys and values that you can include in this dictionary, see CMTextMarkup.h.

Returns:

  • (Object)

    A text style rule object initialized with the specified attributes.

- (Object) initWithTextMarkupAttributes(textMarkupAttributes, textSelector:textSelector)

Initializes a text style rule object with the specified style attributes and text range information.

Parameters:

  • textMarkupAttributes (Hash)

    A dictionary of style attributes. For a list of supported keys and values that you can include in this dictionary, see CMTextMarkup.h.

  • textSelector (String)

    A string contains an identifier for the ranges of text to which the style attributes should be applied. Eligible identifiers are determined by the media format and its corresponding text content. For example, the string could contain the CSS selectors used by the corresponding text in Web Video Text Tracks (WebVTT) markup. Specify nil if you want the style attributes to apply to all text in the item.

Returns:

  • (Object)

    A text style rule object initialized with the specified attributes and range information.