mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
feat(plugin): add onPlayerApiReady hook
Co-authored-by: JellyBrick <shlee1503@naver.com>
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user