mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
1d2d45eb0e
commit
70321cf44a
4 changed files with 29 additions and 19 deletions
|
@ -14,12 +14,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.428",
|
"version": "1.4.431",
|
||||||
"_release": "1.4.428",
|
"_release": "1.4.431",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.428",
|
"tag": "1.4.431",
|
||||||
"commit": "9f2fc55522c782561fa0c24b1a70c77868f46622"
|
"commit": "745cf4df338c6e486eb1ca0480673f8de4bed53d"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.1",
|
"_target": "^1.2.1",
|
||||||
|
|
|
@ -102,7 +102,10 @@ define(['events', 'browser', 'pluginManager', 'apphost', 'appSettings'], functio
|
||||||
self.duration = function (val) {
|
self.duration = function (val) {
|
||||||
|
|
||||||
if (mediaElement) {
|
if (mediaElement) {
|
||||||
return mediaElement.duration * 1000;
|
var duration = mediaElement.duration;
|
||||||
|
if (duration && !isNaN(duration) && duration !== Number.POSITIVE_INFINITY && duration !== Number.NEGATIVE_INFINITY) {
|
||||||
|
return duration * 1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -347,7 +347,10 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
|
||||||
self.duration = function (val) {
|
self.duration = function (val) {
|
||||||
|
|
||||||
if (mediaElement) {
|
if (mediaElement) {
|
||||||
return mediaElement.duration * 1000;
|
var duration = mediaElement.duration;
|
||||||
|
if (duration && !isNaN(duration) && duration !== Number.POSITIVE_INFINITY && duration !== Number.NEGATIVE_INFINITY) {
|
||||||
|
return duration * 1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -875,8 +875,7 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var duration = player.duration();
|
return player.duration();
|
||||||
return duration && !isNaN(duration) && duration !== Number.POSITIVE_INFINITY && duration !== Number.NEGATIVE_INFINITY;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,16 +966,11 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
||||||
|
|
||||||
self.seekPercent = function (percent, player) {
|
self.seekPercent = function (percent, player) {
|
||||||
|
|
||||||
var data = getPlayerData(player).streamInfo;
|
var ticks = self.duration(player) || 0;
|
||||||
var mediaSource = data.mediaSource;
|
|
||||||
|
|
||||||
if (mediaSource) {
|
percent /= 100;
|
||||||
var ticks = mediaSource.RunTimeTicks || 0;
|
ticks *= percent;
|
||||||
|
self.seek(parseInt(ticks));
|
||||||
percent /= 100;
|
|
||||||
ticks *= percent;
|
|
||||||
self.seek(parseInt(ticks));
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.playTrailers = function (item) {
|
self.playTrailers = function (item) {
|
||||||
|
@ -1211,6 +1205,16 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
||||||
return getCurrentTicks(player);
|
return getCurrentTicks(player);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.duration = function (player) {
|
||||||
|
|
||||||
|
player = player || currentPlayer;
|
||||||
|
if (player && !enableLocalPlaylistManagement(player)) {
|
||||||
|
return player.duration();
|
||||||
|
}
|
||||||
|
|
||||||
|
return getPlayerData(player).streamInfo.mediaSource.RunTimeTicks || ((player.duration() || 0) * 10000);
|
||||||
|
};
|
||||||
|
|
||||||
function getCurrentTicks(player) {
|
function getCurrentTicks(player) {
|
||||||
|
|
||||||
var playerTime = Math.floor(10000 * (player || currentPlayer).currentTime());
|
var playerTime = Math.floor(10000 * (player || currentPlayer).currentTime());
|
||||||
|
@ -1225,10 +1229,10 @@ define(['events', 'datetime', 'appSettings', 'pluginManager', 'userSettings', 'g
|
||||||
|
|
||||||
if (mediaSource) {
|
if (mediaSource) {
|
||||||
nowPlayingItem.RunTimeTicks = mediaSource.RunTimeTicks;
|
nowPlayingItem.RunTimeTicks = mediaSource.RunTimeTicks;
|
||||||
} else {
|
|
||||||
nowPlayingItem.RunTimeTicks = player.duration() * 10000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nowPlayingItem.RunTimeTicks = nowPlayingItem.RunTimeTicks || player.duration() * 10000;
|
||||||
|
|
||||||
return nowPlayingItem;
|
return nowPlayingItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue