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:
parent
6a139dd2be
commit
79d61645b4
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue