SABR Fix
This commit is contained in:
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "us.materialio.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 166
|
||||
versionName "1.11.6"
|
||||
versionCode 167
|
||||
versionName "1.11.7"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -76,7 +76,11 @@
|
||||
|
||||
|
||||
|
||||
<release version="1.11.6" date="2025-11-13">
|
||||
|
||||
<release version="1.11.7" date="2025-11-20">
|
||||
<url>https://github.com/Materialious/Materialious/releases/tag/1.11.7</url>
|
||||
</release>
|
||||
<release version="1.11.6" date="2025-11-13">
|
||||
<url>https://github.com/Materialious/Materialious/releases/tag/1.11.6</url>
|
||||
</release>
|
||||
<release version="1.11.5" date="2025-11-08">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Materialious",
|
||||
"version": "1.11.6",
|
||||
"version": "1.11.7",
|
||||
"description": "Modern material design for Invidious.",
|
||||
"author": {
|
||||
"name": "Ward Pearce",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.11.6",
|
||||
"version": "1.11.7",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
||||
@@ -10,9 +10,9 @@ import type {
|
||||
} from '$lib/api/model';
|
||||
import { interfaceRegionStore, poTokenCacheStore } from '$lib/store';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import BG, { USER_AGENT } from 'bgutils-js';
|
||||
import { USER_AGENT } from 'bgutils-js';
|
||||
import { get } from 'svelte/store';
|
||||
import type { Types } from 'youtubei.js';
|
||||
import type { Types, Misc } from 'youtubei.js';
|
||||
import { Innertube, UniversalCache, Utils, YT, YTNodes, Platform } from 'youtubei.js';
|
||||
|
||||
Platform.shim.eval = async (
|
||||
@@ -85,6 +85,29 @@ export async function patchYoutubeJs(videoId: string): Promise<VideoPlay> {
|
||||
|
||||
let dashUri: string | undefined;
|
||||
|
||||
// Unsupported format fix
|
||||
// https://github.com/LuanRT/googlevideo/issues/42
|
||||
if (video.streaming_data)
|
||||
video.streaming_data.adaptive_formats = video.streaming_data.adaptive_formats.filter(
|
||||
(format) => format.xtags !== 'CgcKAnZiEgEx'
|
||||
);
|
||||
|
||||
const adaptiveFormats: AdaptiveFormats[] = [];
|
||||
video.streaming_data?.adaptive_formats.forEach((format) => {
|
||||
adaptiveFormats.push({
|
||||
index: format.index_range?.start?.toString() || '',
|
||||
bitrate: format.bitrate?.toString() || '',
|
||||
init: format.init_range?.start?.toString() || '',
|
||||
url: format.url || '',
|
||||
itag: format.itag?.toString() || '',
|
||||
type: format.mime_type,
|
||||
clen: '',
|
||||
lmt: '',
|
||||
projectionType: 0,
|
||||
resolution: format.width ? `${format.width}x${format.height}` : undefined
|
||||
});
|
||||
});
|
||||
|
||||
const isPostLiveDVR =
|
||||
!!video.basic_info.is_post_live_dvr ||
|
||||
(video.basic_info.is_live_content &&
|
||||
@@ -100,14 +123,13 @@ export async function patchYoutubeJs(videoId: string): Promise<VideoPlay> {
|
||||
? video.streaming_data.hls_manifest_url // HLS is preferred for DVR streams.
|
||||
: `${video.streaming_data.dash_manifest_url}/mpd_version/7`;
|
||||
} else {
|
||||
dashUri = `data:application/dash+xml;base64,${btoa(
|
||||
await video.toDash({
|
||||
manifest_options: {
|
||||
is_sabr: true,
|
||||
include_thumbnails: false
|
||||
}
|
||||
})
|
||||
)}`;
|
||||
const manifest = await video.toDash({
|
||||
manifest_options: {
|
||||
is_sabr: true,
|
||||
include_thumbnails: false
|
||||
}
|
||||
});
|
||||
dashUri = `data:application/dash+xml;base64,${btoa(manifest)}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,22 +194,6 @@ export async function patchYoutubeJs(videoId: string): Promise<VideoPlay> {
|
||||
});
|
||||
});
|
||||
|
||||
const adaptiveFormats: AdaptiveFormats[] = [];
|
||||
video.streaming_data?.adaptive_formats.forEach((format) => {
|
||||
adaptiveFormats.push({
|
||||
index: format.index_range?.start?.toString() || '',
|
||||
bitrate: format.bitrate?.toString() || '',
|
||||
init: format.init_range?.start?.toString() || '',
|
||||
url: format.url || '',
|
||||
itag: format.itag?.toString() || '',
|
||||
type: format.mime_type,
|
||||
clen: '',
|
||||
lmt: '',
|
||||
projectionType: 0,
|
||||
resolution: format.width ? `${format.width}x${format.height}` : undefined
|
||||
});
|
||||
});
|
||||
|
||||
const storyboard: StoryBoard[] = [];
|
||||
if (video.storyboards && 'boards' in video.storyboards) {
|
||||
video.storyboards.boards.forEach((board) => {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import os
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
LATEST_VERSION = "1.11.6"
|
||||
LATEST_VERSION = "1.11.7"
|
||||
RELEASE_DATE = datetime.now().strftime("%Y-%-m-%d") # Format: YYYY-M-D
|
||||
|
||||
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
|
||||
|
||||
Reference in New Issue
Block a user