mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
lazy load chromecast script
This commit is contained in:
parent
3114742ab7
commit
4b6692c92d
2 changed files with 11 additions and 2 deletions
|
@ -1488,8 +1488,8 @@ var Dashboard = {
|
|||
return deferred.promise();
|
||||
},
|
||||
|
||||
onLoggedIn: function(serverAddress, userId, accessToken, apiClient) {
|
||||
|
||||
onLoggedIn: function (serverAddress, userId, accessToken, apiClient) {
|
||||
|
||||
if (Dashboard.isConnectMode()) {
|
||||
Dashboard.serverAddress(serverAddress);
|
||||
}
|
||||
|
@ -1811,6 +1811,14 @@ var AppInfo = {};
|
|||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
requirejs(['thirdparty/cordova/chromecast']);
|
||||
} else {
|
||||
if ($.browser.chrome) {
|
||||
requirejs(['scripts/chromecast']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
requirejs.config({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue