mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-27 15:24:43 +02:00
lint fixes
This commit is contained in:
@@ -226,7 +226,7 @@ export function createSourceNode(buffer: AudioBuffer, opts: {
|
||||
* @param file ファイルのURL(ドライブIDではない)
|
||||
*/
|
||||
export async function getSoundDuration(file: string): Promise<number> {
|
||||
const audioEl = document.createElement('audio');
|
||||
const audioEl = window.document.createElement('audio');
|
||||
audioEl.src = file;
|
||||
return new Promise((resolve) => {
|
||||
const si = setInterval(() => {
|
||||
@@ -249,7 +249,7 @@ export function isMute(): boolean {
|
||||
}
|
||||
|
||||
// noinspection RedundantIfStatementJS
|
||||
if (prefer.s['sound.useSoundOnlyWhenActive'] && document.visibilityState === 'hidden') {
|
||||
if (prefer.s['sound.useSoundOnlyWhenActive'] && window.document.visibilityState === 'hidden') {
|
||||
// ブラウザがアクティブな時のみサウンドを出力する
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user