fix(precise-volume): fix precise-volume plugin

This commit is contained in:
Su-Yong
2023-11-28 12:37:31 +09:00
parent 1d26d10e57
commit ae239f6700

View File

@ -24,7 +24,8 @@ export const moveVolumeHud = debounce((showVideo: boolean) => {
let options: PreciseVolumePluginConfig;
export const onPlayerApiReady = (playerApi: YoutubePlayer, context: RendererContext<PreciseVolumePluginConfig>) => {
export const onPlayerApiReady = async (playerApi: YoutubePlayer, context: RendererContext<PreciseVolumePluginConfig>) => {
options = await context.getConfig();
api = playerApi;
// Without this function it would rewrite config 20 time when volume change by 20