<VOCommonPlayerSubtitle > Protocol Reference

#import <VOCommonPlayerSubtitle.h>

+ Inheritance diagram for <VOCommonPlayerSubtitle >:

Instance Methods

(VO_OSMP_RETURN_CODE) - setSubtitlePath:
 Set file/URL path for external subtitles (for example, smi, srt files, etc.). More...
 
(VO_OSMP_RETURN_CODE) - enableSubtitle:
 Enable/disable subtitles display; Analytics display is disabled by default. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontColor:
 Set subtitle font color. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontOpacity:
 Set he opacity rate of subtitle font color. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontSizeScale:
 Set subtitle font size scale. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontBackgroundColor:
 Set the background color of subtitle font. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontBackgroundOpacity:
 Set the background color opacity rate of subtitle font. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleWindowBackgroundColor:
 Set window background color. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleWindowBackgroundOpacity:
 Set the opacity rate of window background color. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontItalic:
 Enable/Disable subtitle font italics. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontBold:
 Enable/Disable subtitle font bold. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontUnderline:
 Enable/Disable subtitle font underlined. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontName:
 Set subtitle font name. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontEdgeType:
 Set subtitle font edge type. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontEdgeColor:
 Set subtitle font edge color. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleFontEdgeOpacity:
 Set the opacity rate of subtitle font edge color. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleBoundingBox:leftPercent:bottomPercent:rightPercent:
 Set the subtitle bounding box, which overrides the subtitle settings from parser. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleGravity:vertical:
 Set the gravity of the bounding box. More...
 
(VO_OSMP_RETURN_CODE) - setSubtitleTrim:
 Set character sets to be trimmed from the beginning or end of subtitle. More...
 
(VO_OSMP_RETURN_CODE) - resetSubtitleParameter
 Reset all parameters to their default values. More...
 
(VO_OSMP_RETURN_CODE) - enableSubtitleAutoAdjustment:
 Enable/Disable the automatic adjustment for subtitle position/font size. More...
 
(VO_OSMP_RETURN_CODE) - previewSubtitle:view:
 Preview subtitle by sending some sample text to be rendered. More...
 

Method Documentation

- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) enableSubtitle: (bool)  value

Enable/disable subtitles display; Analytics display is disabled by default.

Parameters
value[in] Enable/disable; true to enable (show) subtitles, false to disable (hide) subtitles.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) enableSubtitleAutoAdjustment: (bool)  value

Enable/Disable the automatic adjustment for subtitle position/font size.

Automatic adjustment of subtitle is disabled by default.

Parameters
value[in]Enable/Disable the automatic adjustment for subtitle position/font size. true (Enabled): Uses the font size and location set by VisualOn. false (Disabled): Uses the font size and location from source file.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) previewSubtitle: (NSString *)  sampleText
view: (id)  view 

Preview subtitle by sending some sample text to be rendered.

Parameters
sampleText[in] text for previewing current subtitle settings
view[in] view to which the sample text is being rendered

To preview the subtitle, this API must be called in main thread.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) resetSubtitleParameter

Reset all parameters to their default values.

Subtitles will be presented as specified in the subtitle stream.

Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleBoundingBox: (int)  topPercent
leftPercent: (int)  leftPercent
bottomPercent: (int)  bottomPercent
rightPercent: (int)  rightPercent 

Set the subtitle bounding box, which overrides the subtitle settings from parser.

Parameters
topPercent[in] Set the top position using percent based on the top display edge of video screen.
leftPercent[in] Set the left position using percent based on the left display edge of video screen.
bottomPercent[in] Set the bottom position using percent based on the top display edge of video screen.
rightPercent[in] Set the right position using percent based on the left display edge of video screen.

The valid value is from 0 to 100. The parameter value will be ignored sometimes, such as: The topPercent is ignored if the gravity isn't top and subtitle exceeds the bounding box.

Returns
VO_OSMP_ERR_NONE if successful.
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontBackgroundColor: (int)  color

Set the background color of subtitle font.

Parameters
color[in] Subtitle font background color (0x00RRGGBB).
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontBackgroundOpacity: (int)  alpha

Set the background color opacity rate of subtitle font.

Parameters
alpha[in] Subtitle font background color opacity rate. The valid range is 0 to 100, from transparent to opaque.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontBold: (bool)  enable

Enable/Disable subtitle font bold.

Parameters
enable[in] Enable/Disable; true to enable subtitle font bold.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontColor: (int)  color

Set subtitle font color.

Parameters
color[in] Font color (0x00RRGGBB) of subtitle text.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontEdgeColor: (int)  color

Set subtitle font edge color.

Parameters
color[in] Font edge color (0x00RRGGBB) of subtitle text.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontEdgeOpacity: (int)  alpha

Set the opacity rate of subtitle font edge color.

Parameters
alpha[in] Edge color opacity rate of subtitle font. The valid range is 0 to 100, from transparent to opaque.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontEdgeType: (int)  type

Set subtitle font edge type.

Parameters
type[in] Edge type of subtitle font. Valid values are 0:NONE, 1:RAISED, 2:DEPRESSED, 3:UNIFORM, 4:LEFT_DROP_SHADOW, 5:RIGHT_DROP_SHADOW.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontItalic: (bool)  enable

Enable/Disable subtitle font italics.

Parameters
enable[in] Enable/Disable; true to enable subtitle font italics.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontName: (NSString *)  name

Set subtitle font name.

Parameters
name[in] Font name for subtitle text.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontOpacity: (int)  alpha

Set he opacity rate of subtitle font color.

Parameters
alpha[in] Font color opacity rate. The valid range is 0 to 100, from transparent to opaque.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontSizeScale: (int)  scale

Set subtitle font size scale.

Parameters
scale[in] Font size scale for subtitle text (percent). 50 is half of the default size, and 200 is twice of the default size.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleFontUnderline: (bool)  enable

Enable/Disable subtitle font underlined.

Parameters
enable[in] Enable/Disable; true to enable subtitle font underline.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleGravity: (VO_OSMP_HORIZONTAL)  horizontal
vertical: (VO_OSMP_VERTICAL)  vertical 

Set the gravity of the bounding box.

Parameters
horizontal[in] horizontal position of the gravity Refer to (vertical [in] vertical position of the gravity. Refer to ( VO_OSMP_VERTICAL). VO_OSMP_ERR_NONE} if successful.
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitlePath: (NSString *)  filePath

Set file/URL path for external subtitles (for example, smi, srt files, etc.).

Parameters
filePath[in] Full path/URL (including “http://”) of the external subtitle file.
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleTrim: (NSString *)  trimChars

Set character sets to be trimmed from the beginning or end of subtitle.

Parameters
trimChars[in] The character sets to be trimmed. This argument is not a prefix or suffix of substring; Instead all combinations of its values are trimmed.
Returns
VO_OSMP_ERR_NONE if successful.
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleWindowBackgroundColor: (int)  color

Set window background color.

Parameters
color[in] Subtitle window background color (0x00RRGGBB).
Returns
VO_OSMP_ERR_NONE if successful
- (VO_OSMP_RETURN_CODE VOCommonPlayerSubtitle) setSubtitleWindowBackgroundOpacity: (int)  alpha

Set the opacity rate of window background color.

Parameters
alpha[in] Subtitle window background color opacity rate. The valid range is 0 to 100, from transparent to opaque.
Returns
VO_OSMP_ERR_NONE if successful

The documentation for this protocol was generated from the following file: