bytedance / xgplayer

A HTML5 video player with a parser that saves traffic
https://h5player.bytedance.com/
MIT License
8.17k stars 858 forks source link

播放m3u8的时候,如何获取当前播放的ts的详细信息 #1369

Closed wangyong991 closed 1 month ago

wangyong991 commented 5 months ago

播放的m3u8格式如下

EXTM3U

EXT-X-VERSION:3

EXT-X-TARGETDURATION:2

EXT-X-MEDIA-SEQUENCE:7082092

EXT-X-PROGRAM-DATE-TIME:2024-04-07T18:25:35.355+0800

EXTINF:2.0

EXTINFPTSMS:1463320080

2024040718/1712485546256.ts

EXT-X-PROGRAM-DATE-TIME:2024-04-07T18:25:37.355+0800

EXTINF:2.0

EXTINFPTSMS:1463322080

2024040718/1712485548230.ts

EXT-X-PROGRAM-DATE-TIME:2024-04-07T18:25:39.355+0800

EXTINF:2.0

EXTINFPTSMS:1463324080

2024040718/1712485550264.ts

EXT-X-PROGRAM-DATE-TIME:2024-04-07T18:25:41.355+0800

EXTINF:2.0

EXTINFPTSMS:1463326080

2024040718/1712485552260.ts

我需要播放的时候显示当前播放点对应的programDateTime。hls.js中,可以监听Hls.Events.FRAG_CHANGED 拿到当前ts的programDateTime、startPTS、endPTS、url等信息。 在xgplayer中,播放中能获取当前播放的ts详细信息吗? 对于上面的需求有好的建议吗?

github-actions[bot] commented 2 months ago

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] commented 1 month ago

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!