Constructors
Methods
convertSRTToSubtitles
- convertSRTToSubtitles(srt: string): Subtitles
destroy
- destroy(): void
Returns void
extractSubtitlesFromVideo
- extractSubtitlesFromVideo(mediaDataId: string): Promise<string> | ""
Returns Promise<string> | ""
getHighlightTextStyle
- getHighlightTextStyle(): {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal"
| "italic"
| "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
padding: number;
strokeColor: string;
strokeThickness: number;
} Returns {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal" | "italic" | "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
padding: number;
strokeColor: string;
strokeThickness: number;
}
getMainTextStyle
- getMainTextStyle(): {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal"
| "italic"
| "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
leading: number;
padding: number;
strokeColor: string;
strokeThickness: number;
wordWrap: boolean;
wordWrapWidth: number;
} Returns {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal" | "italic" | "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
leading: number;
padding: number;
strokeColor: string;
strokeThickness: number;
wordWrap: boolean;
wordWrapWidth: number;
}
getTextMode
- getTextMode(): "full" | "partial"
Returns "full" | "partial"
serialize
- serialize(): {
highlightAnimation: HighlightAnimationEnum;
highlightAnimationSpeed: number;
highlightTextStyle: {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal"
| "italic"
| "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
padding: number;
strokeColor: string;
strokeThickness: number;
};
mainTextStyle: {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal"
| "italic"
| "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
leading: number;
padding: number;
strokeColor: string;
strokeThickness: number;
wordWrap: boolean;
wordWrapWidth: number;
};
textMode: "full"
| "partial";
} Returns {
highlightAnimation: HighlightAnimationEnum;
highlightAnimationSpeed: number;
highlightTextStyle: {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal" | "italic" | "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
padding: number;
strokeColor: string;
strokeThickness: number;
};
mainTextStyle: {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal"
| "italic"
| "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
leading: number;
padding: number;
strokeColor: string;
strokeThickness: number;
wordWrap: boolean;
wordWrapWidth: number;
};
textMode: "full"
| "partial";
}
setHighlightedTextStyle
- setHighlightedTextStyle(
style: {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal" | "italic" | "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
padding: number;
strokeColor: string;
strokeThickness: number;
},
reset?: boolean,
): void Parameters
- style: {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal" | "italic" | "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
padding: number;
strokeColor: string;
strokeThickness: number;
} - reset: boolean = false
Returns void
setMainTextStyle
- setMainTextStyle(
style: {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal" | "italic" | "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
leading: number;
padding: number;
strokeColor: string;
strokeThickness: number;
wordWrap: boolean;
wordWrapWidth: number;
},
reset?: boolean,
): void Parameters
- style: {
backgroundColor: string;
backgroundCornerRadius: number;
backgroundPadding: number;
color: string;
fontFamily: string;
fontSize: number;
fontStyle: "normal" | "italic" | "oblique";
fontWeight:
| "bold"
| "normal"
| "bolder"
| "lighter"
| "100"
| "200"
| "300"
| "400"
| "500"
| "600"
| "700"
| "800"
| "900";
leading: number;
padding: number;
strokeColor: string;
strokeThickness: number;
wordWrap: boolean;
wordWrapWidth: number;
} - reset: boolean = false
Returns void
setTextMode
- setTextMode(mode: "full" | "partial"): void
Returns void
update
- update(currentTime: number): void
Returns void
updateSubtitlesClips
- updateSubtitlesClips(subtitleId: string): void
Returns void