mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-08 10:44:20 -04:00
Always name audio tracks
This commit is contained in:
parent
72e74cea32
commit
47a22b6540
@ -165,7 +165,6 @@ export const Player: QueryPage<{ slug: string }> = ({ slug }) => {
|
||||
e.preventDefault();
|
||||
displayControls ? setMouseMoved(false) : show();
|
||||
}}
|
||||
onStartShouldSetResponder={(e) => true}
|
||||
onPointerDown={(e) => {
|
||||
e.preventDefault();
|
||||
if (e.nativeEvent.pointerType !== "mouse") {
|
||||
|
@ -65,7 +65,7 @@ export const fullscreenAtom = atom(
|
||||
set(privateFullscreen, false);
|
||||
screen.orientation.unlock();
|
||||
}
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
},
|
||||
@ -134,7 +134,10 @@ export const Video = memo(function _Video({
|
||||
volume={volume}
|
||||
resizeMode="contain"
|
||||
onBuffer={({ isBuffering }) => setLoad(isBuffering)}
|
||||
onError={(status) => setError(status.error.errorString)}
|
||||
onError={(status) => {
|
||||
console.error(status);
|
||||
setError(status.error.errorString);
|
||||
}}
|
||||
onProgress={(progress) => {
|
||||
setPrivateProgress(progress.currentTime);
|
||||
setBuffered(progress.playableDuration);
|
||||
@ -146,17 +149,16 @@ export const Video = memo(function _Video({
|
||||
selectedTextTrack={
|
||||
subtitle
|
||||
? {
|
||||
type: "index",
|
||||
value: subtitle.trackIndex,
|
||||
}
|
||||
type: "index",
|
||||
value: subtitle.trackIndex,
|
||||
}
|
||||
: { type: "disabled" }
|
||||
}
|
||||
fonts={fonts}
|
||||
onMediaUnsupported={() => {
|
||||
if (mode == PlayMode.Direct)
|
||||
setPlayMode(PlayMode.Hls);
|
||||
if (mode == PlayMode.Direct) setPlayMode(PlayMode.Hls);
|
||||
}}
|
||||
// TODO: textTracks: external subtitles
|
||||
// TODO: textTracks: external subtitles
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
@ -70,11 +70,16 @@ impl Transcoder {
|
||||
// The group-id allows to distinguish multiple qualities from multiple variants.
|
||||
// We could create another quality set and use group-ids hiqual and lowqual.
|
||||
master.push_str("GROUP-ID=\"audio\",");
|
||||
if let Some(language) = audio.language {
|
||||
if let Some(language) = audio.language.clone() {
|
||||
master.push_str(format!("LANGUAGE=\"{}\",", language).as_str());
|
||||
}
|
||||
// Exoplayer throws if audio tracks dont have names so we always add one.
|
||||
if let Some(title) = audio.title {
|
||||
master.push_str(format!("NAME=\"{}\",", title).as_str());
|
||||
} else if let Some(language) = audio.language {
|
||||
master.push_str(format!("NAME=\"{}\"", language).as_str());
|
||||
} else {
|
||||
master.push_str(format!("NAME=\"Audio {}\"", audio.index).as_str());
|
||||
}
|
||||
// TODO: Support aac5.1 (and specify the number of channel bellow)
|
||||
// master.push_str(format!("CHANNELS=\"{}\",", 2).as_str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user