This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { serve } from "https://deno.land/std@0.123.0/http/server.ts"; | |
| const port = 3001; | |
| const handler = async (request: Request): Promise<Response> => { | |
| const { pathname, searchParams, origin } = new URL(request.url); | |
| const host = searchParams.get("host") || ""; | |
| try { | |
| if (pathname.startsWith("/api")) { | |
| const _api = "manifest.googlevideo.com"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { iter, map } from "../../utils/collections/array"; | |
| import { loop } from "../../utils/collections/oop"; | |
| import { taskHandler } from "../../utils/loop"; | |
| import { WritableStore } from "../../utils/store"; | |
| import { throttle } from "../../utils/throttle"; | |
| import { Editor } from "../editor"; | |
| import { EventEmitter } from "../emitter"; | |
| import { TextNode, InlineText } from "../model/text"; | |
| import { createElement, fastCreateElement } from "./utils"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?><MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:full:2011" minBufferTime="PT1.5S" type="static" mediaPresentationDuration="PT129S"><Period><AdaptationSet id="0" mimeType="audio/mp4; codecs="mp4a.40.5"" startWithSAP="1" subsegmentAlignment="true"><Representation id="139" codecs="undefined" bandwidth="49890"><AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/><BaseURL>https://yt-hls-rewriter.onrender.com/videoplayback?expire=1659230480&ei=sITlYvXkHqvjhwbt9Z2oDg&ip=73.230.7.216&id=o-AFLPypNFjeUTfoFENsvJD1iTPLpXolOxem7bDcD4k_wc&itag=139&source=youtube&requiressl=yes&mh=17&mm=31%2C29&mn=sn-p5qlsn7s%2Csn-p5qs7nzk&ms=au%2Crdu&mv=m&mvi=4&pl=16&initcwndbps=1777500&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=786541&dur=128.824&lmt=1659067507647072&mt=1659208619&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=IOS&txp=4532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Csvpuc%2Cm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { Item, JSON, Nullable } from "$lib/types"; | |
| import type Peer from "peerjs"; | |
| import type { DataConnection } from "peerjs"; | |
| import { generateId } from "$lib/utils/id"; | |
| import { browser } from "$app/env"; | |
| import { Logger } from "$lib/utils/logger"; | |
| import { WritableStore } from "$lib/utils/stores"; | |
| import { every, filter, findFirst, iter } from "$lib/utils/collections"; | |
| import SessionListService, { type ISessionListProvider } from "./list"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as fs from 'fs'; | |
| import * as path from 'path'; | |
| const RE_ICONS = /(?<=icon:.*")[\w-]+|.^$/gm; | |
| const RE_TEXT = /(?<=text:.*").[a-zA-Z ]+|.^$/gm; | |
| const RE_OBJ = /(\{)\n.*((text|icon|action):[\s\S]+?){3}\},([\s\S]+?).+?\}/gm; | |
| // const RE_OBJ = /{\n.+(text|icon|action):(.+\n){1,3}.[\s\S]*?},\n.*?}[^,]?|.^$/gm; | |
| const PATH_TO_SRC = path.resolve('./src'); | |
| const objects: Map<string, { text: string, icon: string, action: Promise<void> | void; }> = new Map(); | |
| function recurse(fPath: string) { | |
| const join = (str: string) => path.join(fPath, str); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { serve } from "https://deno.land/std@0.123.0/http/server.ts"; | |
| const port = 3000; | |
| const handler = async (request: Request): Promise<Response> => { | |
| const { pathname, searchParams, origin } = new URL(request.url); | |
| if (pathname.startsWith("/api")) { | |
| const _api = "manifest.googlevideo.com"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { RequestHandler } from "@sveltejs/kit"; | |
| import { buildRequest } from "./_api/request"; | |
| export const GET: RequestHandler = async ({ url }) => { | |
| const query = url.searchParams; | |
| const videoId = query.get("videoId") || ""; | |
| const playlistId = query.get("list") || ""; | |
| const playerParams = query.get("playerParams") || ""; | |
| const quality = query.get('quality') || ""; | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addEventListener("fetch", (event) => { | |
| event.respondWith( | |
| handleRequest(event.request).catch( | |
| (err) => new Response(err.stack, { status: 500 }) | |
| ) | |
| ); | |
| }); | |
| /** | |
| * Many more examples available at: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { MusicResponsiveListItemRenderer } from "$lib/parsers"; | |
| import type { NextContinuationData } from "$lib/types"; | |
| import type { IMusicResponsiveListItemRenderer } from "$lib/types/internals"; | |
| import type { ItemSectionRendererRoot } from "$lib/types/searchTypes"; | |
| import { iter } from "$lib/utils"; | |
| import type { RequestHandler } from "@sveltejs/kit"; | |
| import { buildRequest } from "./_api/request"; | |
| import type { SearchEndpointParams } from "./_api/_base"; | |
| export type SearchFilter = "video" | "community_playlist" | "featured_playlist" | "all_playlist" | "song" | "artist"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ | |
| // import BaseContext from '$api/_modules/contexts/context' | |
| import { MusicResponsiveListItemRenderer } from "$lib/parsers"; | |
| import type { Artist, NextContinuationData, Song } from "$lib/types"; | |
| import type { PlaylistSearch } from "$lib/types/playlist"; | |
| import { map } from "$lib/utils"; | |
| import { pb } from "$lib/utils/utils"; | |
| import type { RequestHandler } from "@sveltejs/kit"; | |
| import { buildRequest } from "./_api/request"; |