UNPKG

@flomon-ui/jsmpeg

Version:
53 lines (52 loc) 1.28 kB
import { PlayerOptions } from './interfaces/player'; import Player from './jsmpeg/player'; export interface RTSPParams { /** * RTSP Server URL * * @type {string} */ rtspUrl: string; /** * Video resolution * e.g. '640:480', '1280:720', '1920:1080', etc... * * @type {string} * @default '640:-1' */ scale?: string; /** * encoding result * The smaller the number, the higher the quality. * qscale 1 ~ 51 * * @type {number} * @default 25 * */ qscale?: number; /** * If your RTSP stream need credentials, includ them in the 'rtspUrl'. * * @type {boolean} * @default true */ verbose?: boolean; /** * Transport type of ffmpeg * * @type {('udp' | 'tcp' | 'udp_multicast' | 'http')} */ transport?: 'udp' | 'tcp' | 'udp_multicast' | 'http'; } export interface RTSPPlayerOptions extends PlayerOptions { params: RTSPParams; } export default class RTSPPlayer extends Player { /** * Creates an instance of RTSPPlayer. * @param {string} url * @param {RTSPPlayerOptions} options */ constructor(url: string, options: RTSPPlayerOptions); }