feat(plugin): add onPlayerApiReady hook

Co-authored-by: JellyBrick <shlee1503@naver.com>
This commit is contained in:
Su-Yong
2023-11-12 01:51:26 +09:00
parent 2097f42efb
commit a4f4ecb569
22 changed files with 273 additions and 291 deletions

View File

@ -54,7 +54,7 @@ const post = (data: Data) => {
export default builder.createMain(({ send, handle, on }) => {
return {
onLoad() {
on('apiLoaded', () => send('setupTimeChangedListener'));
on('ytmd:player-api-loaded', () => send('setupTimeChangedListener'));
on('timeChanged', (t: number) => {
if (!data.title) {
return;