This commit is contained in:
Zoe Roux 2023-10-17 23:47:07 +02:00
parent eb351f9bed
commit 28855046b8
2 changed files with 5 additions and 2 deletions

View File

@ -101,7 +101,6 @@ export const EpisodeLine = ({
href={slug ? `/watch/${slug}` : ""}
{...css(
{
m: ts(1),
alignItems: "center",
flexDirection: "row",
child: {
@ -153,4 +152,6 @@ export const EpisodeLine = ({
EpisodeLine.layout = {
numColumns: 1,
size: 100,
layout: "vertical",
gap: ts(1),
} satisfies Layout;

View File

@ -81,7 +81,9 @@ impl Transcoder {
let aspect_ratio = info.video.width as f32 / info.video.height as f32;
// Do not include a quality with the same height as the original (simpler for automatic
// selection on the client side.)
for quality in Quality::iter().filter(|x| x.height() < info.video.quality.height() && x.average_bitrate() < info.video.bitrate) {
for quality in Quality::iter().filter(|x| {
x.height() < info.video.quality.height() && x.average_bitrate() < info.video.bitrate
}) {
// Doc: https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/creating_a_multivariant_playlist
master.push_str("#EXT-X-STREAM-INF:");
master.push_str(format!("AVERAGE-BANDWIDTH={},", quality.average_bitrate()).as_str());