forked from RSATom/WebChimera.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Add typing * fix: revert package name * fix: typing * fix: missing files * chore: 0.5.3
- Loading branch information
Showing
2 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
export type PixelFormat = "RV32" | "I420"; | ||
declare enum _VLCAudioChannel { | ||
Stereo = 0, | ||
ReverseStereo = 1, | ||
Left = 2, | ||
Right = 3, | ||
Dolby = 4, | ||
} | ||
export type VLCAudio = { | ||
readonly count: number; | ||
readonly [key: number]: string; | ||
track: number; | ||
mute: boolean; | ||
volume: number; | ||
channel: _VLCAudioChannel; | ||
delay: number; | ||
}; | ||
export type VLCSubtitle = { | ||
readonly count: number; | ||
readonly [key: number]: string; | ||
track: number; | ||
delay: number; | ||
}; | ||
export type VLCInput = { | ||
readonly length: number; | ||
readonly fps: number; | ||
readonly state: number; | ||
readonly hasVout: boolean; | ||
position: number; | ||
time: number; | ||
rate: number; | ||
}; | ||
export interface Player { | ||
readonly vlcVersion: string; | ||
readonly playing: boolean; | ||
readonly length: number; | ||
pixelFormat: PixelFormat; | ||
time: number; | ||
volume: number; | ||
mute: boolean; | ||
play: (url?: string) => void; | ||
pause: () => void; | ||
togglePause: () => void; | ||
stop: () => void; | ||
toggleMute: () => void; | ||
close: () => void; | ||
onMediaChanged: () => void; | ||
onBuffering: (percents: number) => void; | ||
onPlaying: () => void; | ||
onPaused: () => void; | ||
onEncounteredError: () => void; | ||
onEndReached: () => void; | ||
onStopped: () => void; | ||
onTimeChanged: (time: number) => void; | ||
onPositionChanged: (time: number) => void; | ||
onSeekableChanged: (seekable: boolean) => void; | ||
onPausableChanged: (pausable: boolean) => void; | ||
onLengthChanged: (length: number) => void; | ||
onLogMessage: (level: string, message: string, format: string) => void; | ||
onFrameReady: ( | ||
frame: { | ||
width: number; | ||
height: number; | ||
uOffset: number; | ||
vOffset: number; | ||
} & Uint8Array | ||
) => void; | ||
audio: VLCAudio; | ||
subtitles: VLCSubtitle; | ||
position: number; | ||
input: VLCInput; | ||
} | ||
export const createPlayer: (args?: string[]) => Player; | ||
export const path: string | undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters