Skip to content

Commit

Permalink
chore(PlayerEndpoint): Remove outdated code
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Apr 29, 2024
1 parent d48b9d0 commit 1332188
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/core/endpoints/PlayerEndpoint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { encodeShortsParam } from '../../proto/index.js';
import type { IPlayerRequest, PlayerEndpointOptions } from '../../types/index.js';

export const PATH = '/player';
Expand All @@ -9,11 +8,6 @@ export const PATH = '/player';
* @returns The payload.
*/
export function build(opts: PlayerEndpointOptions): IPlayerRequest {
const is_android =
opts.client === 'ANDROID' ||
opts.client === 'YTMUSIC_ANDROID' ||
opts.client === 'YTSTUDIO_ANDROID';

return {
playbackContext: {
contentPlaybackContext: {
Expand Down Expand Up @@ -43,8 +37,7 @@ export function build(opts: PlayerEndpointOptions): IPlayerRequest {
...{
client: opts.client,
playlistId: opts.playlist_id,
// Workaround streaming URLs returning 403 or getting throttled when using Android based clients.
params: is_android ? encodeShortsParam() : opts.params
params: opts.params
}
};
}

0 comments on commit 1332188

Please sign in to comment.