mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
chore: add debounce to setSubtitleOffset
This commit is contained in:
parent
032d03d201
commit
acdbf59b50
1 changed files with 7 additions and 1 deletions
|
@ -32,6 +32,7 @@ import { getIncludeCorsCredentials } from '../../scripts/settings/webSettings';
|
|||
import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../components/backdrop/backdrop';
|
||||
import Events from '../../utils/events.ts';
|
||||
import { includesAny } from '../../utils/container.ts';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
|
||||
/**
|
||||
* Returns resolved URL.
|
||||
|
@ -571,7 +572,12 @@ function tryRemoveElement(elem) {
|
|||
}
|
||||
}
|
||||
|
||||
setSubtitleOffset(offset) {
|
||||
setSubtitleOffset = debounce(this._setSubtitleOffset, 500);
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
_setSubtitleOffset(offset) {
|
||||
const offsetValue = parseFloat(offset);
|
||||
|
||||
// if .ass currently rendering
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue