xgplayer icon indicating copy to clipboard operation
xgplayer copied to clipboard

3.0.9最新版本为什么一大堆报错啊?

Open JinGuiMin opened this issue 1 year ago • 3 comments

版本:3.0.9

我在Angular的ts文件中直接按照文档中的复制过去的。结果编译失败,一大堆报错。

关键代码如下: import Player from "xgplayer"; import "xgplayer/dist/index.min.css"; ngAfterViewInit(): void { this.instance = new Player ({ id: this.container.nativeElement, url: "https://www.runoob.com/try/demo_source/movie.mp4", height: "100%", width: "100%", }); } 报错如下

image

JinGuiMin avatar Oct 16 '23 06:10 JinGuiMin

怀疑是版本冲突,我用的是Angular7

JinGuiMin avatar Oct 16 '23 06:10 JinGuiMin

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Feb 15 '24 08:02 github-actions[bot]

angular 15

    "xgplayer": "^3.0.13",
    "xgplayer-hls": "^3.0.13",
    "xgplayer-hls.js": "^3.0.13",

xgplayer-hls 和 xgplayer-hls.js 项目启动都不行。

Error: node_modules/xgplayer-hls/es/hls/config.d.ts:33:13 - error TS2456: Type alias 'HlsOption' circularly references itself.

33 export type HlsOption = HlsOption;
               ~~~~~~~~~


Error: node_modules/xgplayer-hls/es/hls/index.d.ts:123:23 - error TS2503: Cannot find namespace 'NodeJS'.

123     _disconnectTimer: NodeJS.Timeout;
                          ~~~~~~


Error: node_modules/xgplayer-hls/es/hls/manifest-loader/index.d.ts:4:13 - error TS2503: Cannot find namespace 'NodeJS'.

4     _timer: NodeJS.Timeout;
              ~~~~~~


Error: node_modules/xgplayer-streaming-shared/es/mse.d.ts:28:43 - error TS1016: A required parameter cannot follow an optional parameter.

28     constructor(media?: HTMLMediaElement, config: any);
                                             ~~~~~~


Error: node_modules/xgplayer-transmuxer/es/model/audio-sample.d.ts:7:67 - error TS1016: A required parameter cannot follow an optional parameter.

7     constructor(pts: number, data: Uint8Array, duration?: number, sampleOffset: any);
                                                                    ~~~~~~~~~~~~



sdandroid avatar Feb 21 '24 09:02 sdandroid

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar May 22 '24 10:05 github-actions[bot]

This issue has been automatically closed after a period of inactivity. If it is still present in the latest release, please create a new issue with up-to-date information. Thank you!

github-actions[bot] avatar Jun 24 '24 10:06 github-actions[bot]