mirror of
https://github.com/iv-org/invidious.git
synced 2026-08-17 13:30:53 -05:00
fix: auto hide player bar
This commit is contained in:
parent
2b32cdb4f3
commit
a794618d4e
@ -53,11 +53,12 @@
|
||||
object-fit: contain !important;
|
||||
}
|
||||
|
||||
/* IMPORTANT: Force controls to be visible */
|
||||
/* Let Shaka auto-hide the controls when idle. (Previously these were forced to
|
||||
opacity:1 !important, so the control bar / progress bar never disappeared.) Keep
|
||||
only the fade transition. */
|
||||
.shaka-controls-button-panel,
|
||||
.shaka-scrim-container,
|
||||
.shaka-play-button {
|
||||
opacity: 1 !important;
|
||||
transition: opacity cubic-bezier(.4, 0, .6, 1) .6s;
|
||||
}
|
||||
|
||||
@ -89,7 +90,6 @@
|
||||
.shaka-seek-bar-container {
|
||||
height: 5px !important;
|
||||
margin-bottom: 10px;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.shaka-seek-bar {
|
||||
|
||||
@ -713,6 +713,21 @@ var SABRPlayer = (function () {
|
||||
loadedListenerInstalled = true;
|
||||
}
|
||||
|
||||
// Default to the ORIGINAL audio language (e.g. English), not a dubbed track.
|
||||
// Without a preferredAudioLanguage, shaka picks the first variant (often a dub);
|
||||
// it doesn't honor our `primary`/original flag on its own. Derive the original
|
||||
// language from the adaptive format flagged is_original and set it as preferred.
|
||||
if (!isLive && streamingData.adaptive_formats) {
|
||||
var originalAudioLang = null;
|
||||
for (var afi = 0; afi < streamingData.adaptive_formats.length; afi++) {
|
||||
var af = streamingData.adaptive_formats[afi];
|
||||
if (af.is_original && af.language) { originalAudioLang = af.language; break; }
|
||||
}
|
||||
if (originalAudioLang) {
|
||||
try { player.configure('preferredAudioLanguage', originalAudioLang); } catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
var startTime = options.startTime;
|
||||
if (startTime === undefined && options.savePlayerPos !== false) {
|
||||
startTime = getPlaybackPosition(videoId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user