1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

upgrade autocast to es6

This commit is contained in:
vitorsemeano 2020-10-18 18:57:20 +01:00
parent 6a139dd2be
commit 79d61645b4

View file

@ -1,5 +1,6 @@
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
import playbackManager from '../components/playback/playbackmanager'; import { playbackManager } from '../components/playback/playbackmanager';
import ServerConnections from '../components/ServerConnections';
export function supported() { export function supported() {
return typeof(Storage) !== 'undefined'; return typeof(Storage) !== 'undefined';
@ -41,7 +42,8 @@ function onOpen() {
}); });
} }
const apiClient = window.connectionManager.currentApiClient(); const apiClient = ServerConnections.currentApiClient();
if (apiClient && supported()) { if (apiClient && supported()) {
Events.on(apiClient, 'websocketopen', onOpen); Events.on(apiClient, 'websocketopen', onOpen);
} }