mirror of
https://github.com/LuanRT/googlevideo.git
synced 2026-06-13 08:42:31 +00:00
fix(sabr): Video-only playback is no longer supported
What a bummer... At least they can't remove audio-only, since it's still needed for YouTube Music. :)
This commit is contained in:
@@ -3,7 +3,7 @@ import cliProgress from 'cli-progress';
|
||||
import type { WriteStream } from 'node:fs';
|
||||
import { createWriteStream, unlink } from 'node:fs';
|
||||
import { Innertube, UniversalCache } from 'youtubei.js';
|
||||
import GoogleVideo, { type Format, Protos } from '../../dist/src/index.js';
|
||||
import GoogleVideo, { type Format } from '../../dist/src/index.js';
|
||||
|
||||
const progressBars = new cliProgress.MultiBar({
|
||||
stopOnComplete: true,
|
||||
@@ -121,8 +121,8 @@ await serverAbrStream.init({
|
||||
audioFormats: [ selectedAudioFormat ],
|
||||
videoFormats: [ selectedVideoFormat ],
|
||||
clientAbrState: {
|
||||
mediaType: Protos.MediaType.MEDIA_TYPE_DEFAULT,
|
||||
startTimeMs: 0
|
||||
startTimeMs: 0,
|
||||
mediaType: 0 // 0 = BOTH, 1 = AUDIO (video-only is no longer supported by YouTube)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import cliProgress from 'cli-progress';
|
||||
import type { WriteStream } from 'node:fs';
|
||||
import { createWriteStream } from 'node:fs';
|
||||
import { Innertube, UniversalCache } from 'youtubei.js';
|
||||
import GoogleVideo, { type Format, Protos } from '../../dist/src/index.js';
|
||||
import GoogleVideo, { type Format } from '../../dist/src/index.js';
|
||||
|
||||
const progressBars = new cliProgress.MultiBar({
|
||||
stopOnComplete: true,
|
||||
@@ -130,13 +130,8 @@ await serverAbrStream.init({
|
||||
audioFormats: [ selectedAudioFormat ],
|
||||
videoFormats: [ selectedVideoFormat ],
|
||||
clientAbrState: {
|
||||
/**
|
||||
* MEDIA_TYPE_DEFAULT = 0,
|
||||
* MEDIA_TYPE_AUDIO = 1,
|
||||
* MEDIA_TYPE_VIDEO = 2,
|
||||
*/
|
||||
mediaType: Protos.MediaType.MEDIA_TYPE_DEFAULT,
|
||||
startTimeMs: 0
|
||||
startTimeMs: 0,
|
||||
mediaType: 0 // 0 = BOTH, 1 = AUDIO (video-only is no longer supported by YouTube)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user