/** * 字幕消息 * * @property { number } callIndex - 消息序列号 * @property { string } content - 字幕规则 * @property { string } type - 字幕类型 */ export interface ISubTitle { callIndex: number; content: string; type: string; } /** * 字幕消息内容,包含内容、字体、背景等 * * @property { string } content - 字幕内容 * @property { string? } i18nKey - 字幕内容国际化语言key * @property { string? } fontFamily - 字体 * @property { string? } fontRGB - 字体色 * @property { XYSubTitleScroll } scroll - 是否滚动,"1"代表滚动字幕,"0"代表固定字幕 * @property { XYSubTitleAction } action - 动作,"push"代表显示字幕;"cancel"代表取消字幕 * @property { XYSubTitleLocation } location - 位置'top' | 'middle' | 'bottom',分别代表上、中、下位置 * @property { XYSubTitleFontSize } fontSize - 位置'small' | 'middle' | 'big',分别代表小、中、大号字体 * @property { string? } backgroundAlpha - 背景色 * @property { string? } scrollSpeed - 滚动速度, 忽略 * @property { string? } backgroundRGB - 背景色 * @property { number? } scrollSpeedLevel - 滚动速度等级, 1-15,默认是3 */ export interface ISubTitleContent { content: string; i18nKey?: string; fontFamily?: string; fontRGB?: string; scroll?: XYSubTitleScroll; action?: XYSubTitleAction; location?: XYSubTitleLocation; fontSize?: XYSubTitleFontSize; backgroundAlpha?: string; scrollSpeed?: string; backgroundRGB?: string; scrollSpeedLevel?: number; } /** * 字幕滚动状态 * * @param FIXED - 固定字幕 * @param SCROLL - 滚动字幕 */ export declare enum XYSubTitleScroll { FIXED = "0", SCROLL = "1" } /** * 字幕动作 * * @param PUSH - 显示字幕 * @param CANCEL - 取消字幕 */ export declare enum XYSubTitleAction { PUSH = "push", CANCEL = "cancel" } /** * 字幕位置 * * @param TOP - 顶部 * @param MIDDLE - 中间 * @param BOTTOM - 底部 */ export declare enum XYSubTitleLocation { TOP = "top", MIDDLE = "middle", BOTTOM = "bottom" } /** * 字幕字体大小 * * @param SMALL - 小号 * @param MIDDLE - 中号 * @param BIG - 大号 */ export declare enum XYSubTitleFontSize { SMALL = "small", MIDDLE = "middle", BIG = "big" }