增加新版本web页面
This commit is contained in:
428
web/public/static/js/h265web/h265webjs-v20221106.js
Normal file
428
web/public/static/js/h265web/h265webjs-v20221106.js
Normal file
File diff suppressed because one or more lines are too long
97
web/public/static/js/h265web/index.d.ts
vendored
Normal file
97
web/public/static/js/h265web/index.d.ts
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
export interface Web265JsExtraConfig {
|
||||
moovStartFlag?: boolean
|
||||
rawFps?: number
|
||||
autoCrop?: boolean
|
||||
core?: 0 | 1
|
||||
coreProbePart?: number
|
||||
ignoreAudio?: 0 | 1
|
||||
probeSize?: number
|
||||
}
|
||||
|
||||
export interface Web265JsConfig {
|
||||
/**
|
||||
*The type of the file to be played, do not fill in the automatic identification
|
||||
*/
|
||||
type?: 'mp4' | 'hls' | 'ts' | 'raw265' | 'flv'
|
||||
/**
|
||||
* playback window dom id value
|
||||
*/
|
||||
player: string
|
||||
/**
|
||||
* the video window width size
|
||||
*/
|
||||
width: number
|
||||
/**
|
||||
* the video window height size
|
||||
*/
|
||||
height: number
|
||||
/**
|
||||
* player token value
|
||||
*/
|
||||
token: string
|
||||
extInfo?: Web265JsExtraConfig
|
||||
}
|
||||
|
||||
export interface Web265JsMediaInfo {
|
||||
audioNone: boolean
|
||||
durationMs: number
|
||||
fps: number
|
||||
sampleRate: number
|
||||
size: {
|
||||
height: number
|
||||
width: number
|
||||
}
|
||||
videoCodec: 0 | 1
|
||||
isHEVC: boolean
|
||||
videoType: Web265JsConfig['type']
|
||||
}
|
||||
|
||||
interface New265WebJs {
|
||||
onSeekFinish(): void
|
||||
onRender(
|
||||
width: number,
|
||||
height: number,
|
||||
imageBufferY: typeof Uint8Array,
|
||||
imageBufferB: typeof Uint8Array,
|
||||
imageBufferR: typeof Uint8Array
|
||||
): void
|
||||
onLoadFinish(): void
|
||||
onPlayTime(videoPTS: number): void
|
||||
onPlayFinish(): void
|
||||
onCacheProcess(cPts: number): void
|
||||
onReadyShowDone(): void
|
||||
onLoadCache(): void
|
||||
onLoadCacheFinshed(): void
|
||||
onOpenFullScreen(): void
|
||||
onCloseFullScreen(): void
|
||||
do(): void
|
||||
pause(): void
|
||||
isPlaying(): boolean
|
||||
setRenderScreen(state: boolean): void
|
||||
seek(pts: number): void
|
||||
setVoice(volume: number): void
|
||||
mediaInfo(): Web265JsMediaInfo
|
||||
fullScreen(): void
|
||||
closeFullScreen(): void
|
||||
playNextFrame(): void
|
||||
snapshot(): void
|
||||
release(): void
|
||||
setPlaybackRate(rate: number): void
|
||||
getPlaybackRate(): number
|
||||
}
|
||||
|
||||
declare type new265webJsFn = (
|
||||
url: string,
|
||||
config: Web265JsConfig
|
||||
) => New265WebJs
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
new265webjs: new265webJsFn
|
||||
}
|
||||
}
|
||||
|
||||
export default class H265webjsModule {
|
||||
static createPlayer: (url: string, config: Web265JsConfig) => New265WebJs
|
||||
static clear(): void
|
||||
}
|
||||
32
web/public/static/js/h265web/index.js
Normal file
32
web/public/static/js/h265web/index.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/*********************************************************
|
||||
* LICENSE: LICENSE-Free_CN.MD
|
||||
*
|
||||
* Author: Numberwolf - ChangYanlong
|
||||
* QQ: 531365872
|
||||
* QQ Group:925466059
|
||||
* Wechat: numberwolf11
|
||||
* Discord: numberwolf#8694
|
||||
* E-Mail: porschegt23@foxmail.com
|
||||
* Github: https://github.com/numberwolf/h265web.js
|
||||
*
|
||||
* 作者: 小老虎(Numberwolf)(常炎隆)
|
||||
* QQ: 531365872
|
||||
* QQ群: 531365872
|
||||
* 微信: numberwolf11
|
||||
* Discord: numberwolf#8694
|
||||
* 邮箱: porschegt23@foxmail.com
|
||||
* 博客: https://www.jianshu.com/u/9c09c1e00fd1
|
||||
* Github: https://github.com/numberwolf/h265web.js
|
||||
*
|
||||
**********************************************************/
|
||||
require('./h265webjs-v20221106');
|
||||
export default class h265webjs {
|
||||
static createPlayer(videoURL, config) {
|
||||
return window.new265webjs(videoURL, config);
|
||||
}
|
||||
|
||||
static clear() {
|
||||
global.STATICE_MEM_playerCount = -1;
|
||||
global.STATICE_MEM_playerIndexPtr = 0;
|
||||
}
|
||||
}
|
||||
BIN
web/public/static/js/h265web/missile-v20221120.wasm
Normal file
BIN
web/public/static/js/h265web/missile-v20221120.wasm
Normal file
Binary file not shown.
7062
web/public/static/js/h265web/missile.js
Normal file
7062
web/public/static/js/h265web/missile.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user