Code easy to read by suggestion from code review

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
bonjinnorenka 2023-09-23 18:13:54 +09:00 committed by GitHub
parent c3ea7fb72c
commit 00ae96a7e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 7 deletions

View file

@ -83,7 +83,20 @@ function return_message(message, target_window) {
}
if (message.message_kind === 'event') {
if (message.eventname === 'timeupdate' || message.eventname === 'loadedmetadata') {
additional_info['value'] = { getvolume: player.volume(), getduration: player.duration(), getcurrenttime: player.currentTime(), getplaystatus: player.paused(), getplaybackrate: player.playbackRate(), getloopstatus: player.loop(), getmutestatus: player.muted(), getfullscreenstatus: player.isFullscreen(), getavailableplaybackrates: options.playbackRates, gettitle: player_data.title, getplaylistindex: video_data.index, getplaylistid: video_data.plid };
additional_info['value'] = {
getvolume: player.volume(),
getduration: player.duration(),
getcurrenttime: player.currentTime(),
getplaystatus: player.paused(),
getplaybackrate: player.playbackRate(),
getloopstatus: player.loop(),
getmutestatus: player.muted(),
getfullscreenstatus: player.isFullscreen(),
getavailableplaybackrates: options.playbackRates,
gettitle: player_data.title,
getplaylistindex: video_data.index,
getplaylistid: video_data.plid
};
}
}
if (message.eventname === 'error') {