mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
Merge pull request #3724 from samcon/fix_resume_webos
This commit is contained in:
commit
bc48691738
@ -131,7 +131,8 @@ import { Events } from 'jellyfin-apiclient';
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setCurrentTimeIfNeeded(element, seconds) {
|
function setCurrentTimeIfNeeded(element, seconds) {
|
||||||
if (Math.abs(element.currentTime || 0, seconds) <= 1) {
|
// If it's worth skipping (1 sec or less of a difference)
|
||||||
|
if (Math.abs((element.currentTime || 0) - seconds) >= 1) {
|
||||||
element.currentTime = seconds;
|
element.currentTime = seconds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1375,6 +1375,9 @@ function tryRemoveElement(elem) {
|
|||||||
// Can't autoplay in these browsers so we need to use the full controls, at least until playback starts
|
// Can't autoplay in these browsers so we need to use the full controls, at least until playback starts
|
||||||
if (!appHost.supports('htmlvideoautoplay')) {
|
if (!appHost.supports('htmlvideoautoplay')) {
|
||||||
html += '<video class="' + cssClass + '" preload="metadata" autoplay="autoplay" controls="controls" webkit-playsinline playsinline>';
|
html += '<video class="' + cssClass + '" preload="metadata" autoplay="autoplay" controls="controls" webkit-playsinline playsinline>';
|
||||||
|
} else if (browser.web0s) {
|
||||||
|
// in webOS, setting preload auto allows resuming videos
|
||||||
|
html += '<video class="' + cssClass + '" preload="auto" autoplay="autoplay" webkit-playsinline playsinline>';
|
||||||
} else {
|
} else {
|
||||||
// Chrome 35 won't play with preload none
|
// Chrome 35 won't play with preload none
|
||||||
html += '<video class="' + cssClass + '" preload="metadata" autoplay="autoplay" webkit-playsinline playsinline>';
|
html += '<video class="' + cssClass + '" preload="metadata" autoplay="autoplay" webkit-playsinline playsinline>';
|
||||||
|
Loading…
Reference in New Issue
Block a user