mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Code review changes.
This commit is contained in:
parent
c4e87eb562
commit
817953f87a
2 changed files with 5 additions and 5 deletions
|
@ -34,12 +34,12 @@ class PlaybackPermissionManager {
|
|||
* Tests playback permission. Grabs the permission when called inside a click event (or any other valid user interaction).
|
||||
* @returns {Promise} Promise that resolves succesfully if playback permission is allowed.
|
||||
*/
|
||||
async check () {
|
||||
check () {
|
||||
if (appHost.supports('htmlaudioautoplay')) {
|
||||
return true;
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
|
||||
return await new Promise((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const media = createTestMediaElement();
|
||||
media.play().then(() => {
|
||||
resolve();
|
||||
|
|
|
@ -162,7 +162,7 @@ import '../../assets/css/flexstyles.scss';
|
|||
const fn = onHideAnimationComplete.bind(instance);
|
||||
instance._onHideAnimationComplete = fn;
|
||||
|
||||
const e = await new Promise((resolve) => {
|
||||
const transitionEvent = await new Promise((resolve) => {
|
||||
dom.addEventListener(elem, transitionEndEventName, resolve, {
|
||||
once: true
|
||||
});
|
||||
|
@ -173,7 +173,7 @@ import '../../assets/css/flexstyles.scss';
|
|||
elem.classList.add('upNextDialog-hidden');
|
||||
});
|
||||
|
||||
instance._onHideAnimationComplete(e);
|
||||
instance._onHideAnimationComplete(transitionEvent);
|
||||
}
|
||||
|
||||
function getTimeRemainingMs(instance) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue