Module to provide a Multi-producer, Multi-consumer FIFO message channel.
Demo: https://codesandbox.io/s/mpmc-demo-7cy89ub
import { mpmc } from '...';| const request = await fetch( | |
| "https://www.youtube.com/youtubei/v1/search?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&prettyPrint=false", | |
| { | |
| body: JSON.stringify({ | |
| context: { | |
| client: { | |
| hl: "en", | |
| gl: "US", | |
| userAgent: | |
| "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.33,gzip(gfe)", |
Module to provide a Multi-producer, Multi-consumer FIFO message channel.
Demo: https://codesandbox.io/s/mpmc-demo-7cy89ub
import { mpmc } from '...';| <?xml version="1.0" encoding="utf-8"?><MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:full:2011" xmlns:yt="http://youtube.com/yt/2012/10/10" minBufferTime="PT1.5S" type="static" mediaPresentationDuration="PT256S"><Period><AdaptationSet id="0" mimeType="audio/mp4" startWithSAP="1" subsegmentAlignment="true"><Representation id="139" codecs="mp4a.40.5" bandwidth="50496"><AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/><BaseURL>https://yt-hls-rewriter.onrender.com/videoplayback?expire=1662660868&ei=pNwZY7ikAciE8wTdyIJI&ip=172.70.38.227&id=o-AJJ5Fo3z_dZJ1gHUMmL8Km4LyupvKh1_F6zEcnSCEYcn&itag=139&source=youtube&requiressl=yes&mh=7b&mm=31%2C26&mn=sn-p5qs7nsk%2Csn-ab5l6nrl&ms=au%2Conr&mv=m&mvi=3&pl=24&gcr=us&initcwndbps=5268750&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=1564240&dur=256.093&lmt=1592491685743958&mt=1662638947&fvip=1&kee |
| <?xml version="1.0" encoding="utf-8"?><MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:full:2011" xmlns:yt="http://youtube.com/yt/2012/10/10" minBufferTime="PT1.5S" type="static" mediaPresentationDuration="PT391S"><Period><AdaptationSet id="0" mimeType="audio/mp4" startWithSAP="1" subsegmentAlignment="true"><Representation id="139" codecs="mp4a.40.5" bandwidth="50826"><AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/><BaseURL>https://yt-hls-rewriter.onrender.com/videoplayback?expire=1662660440&ei=-NoZY8C_Nq2U2LYPqdyzgA8&ip=172.70.38.227&id=o-AO2Why3h3FhTSNil5jyPeGhzLKgYxktZABCyqljT1Vdf&itag=139&source=youtube&requiressl=yes&mh=Hn&mm=31%2C26&mn=sn-p5qlsnd6%2Csn-ab5l6nrk&ms=au%2Conr&mv=m&mvi=2&pl=24&gcr=us&initcwndbps=4368750&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=2388793&dur=391.376&lmt=1659118408303211&mt=1662638466&fvip=2& |
| // node_modules/hls.js/dist/hls.js | |
| var require_hls = __commonJS({ | |
| "node_modules/hls.js/dist/hls.js"(exports, module) { | |
| typeof window !== "undefined" && function webpackUniversalModuleDefinition(root, factory) { | |
| if (typeof exports === "object" && typeof module === "object") | |
| module.exports = factory(); | |
| else if (typeof define === "function" && define.amd) | |
| define([], factory); | |
| else if (typeof exports === "object") | |
| exports["Hls"] = factory(); |
| 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"; |
| #!/usr/bin/env node | |
| import{readdirSync as pt,writeFileSync as lt}from"fs";import{homedir as mt}from"os";import{join as ut,resolve as A}from"path";import dt from"readline";var G=(...t)=>process.stdout.hasColors()?"\x1B[92m"+t[0]+"\x1B[39m":t[0];var D=(...t)=>process.stdout.hasColors()?"\x1B[104m"+t[0]+"\x1B[49m":t[0];var F=(...t)=>process.stdout.hasColors()?"\x1B[97m"+t[0]+"\x1B[39m":t[0];var x=(...t)=>process.stdout.hasColors()?"\x1B[1m"+t[0]+"\x1B[22m":t[0],l=(...t)=>process.stdout.hasColors()?"\x1B[2m"+t[0]+"\x1B[22m":t[0];var U=(...t)=>process.stdout.hasColors()?"\x1B[4m"+t[0]+"\x1B[24m":t[0],J=(...t)=>process.stdout.hasColors()?"\x1B[7m"+t[0]+"\x1B[27m":t[0];async function H(t){let o=process.stdout,n=process.stdin,s=dt.createInterface({input:n,output:o,completer:p=>{let d=p.lastIndexOf("/"),B=p.indexOf("/")?p.substring(0,d+1):"",it=p.substr(d+1),ct=A(B),I=pt(ct),y=I.filter(at=>at.indexOf(it)===0),S=[];return y.length===1&&S.push(B+y[0]+"/"),S.length?[S,p]:[y.length?y:I,p]}});s.write(` | |
| `+(t?l("[GLOBAL] "): |
| mod hls; | |
| use futures::Future; | |
| use hls::modify_hls_body; | |
| use async_recursion::async_recursion; | |
| use futures::future::{BoxFuture, FutureExt}; | |
| use hyper::body::{self}; | |
| use hyper::server::conn::Http; |
| {"page":"Account","header":{"title":"My Account","subtitle":"Some subtitle"},"items":{"sections":[{"title":"Identity","type":1,"content":[{"text":"John Doe","label":"Name"},{"label":"Email","text":"john.doe@notarealemail.com"}]},{"title":"Contact","type":0,"content":[{"label":"Phone Number","text":"+1 (999) 555-5555"}]}]}} |
| mod hls; | |
| use futures::Future; | |
| use hls::modify_hls_body; | |
| use futures::future::{BoxFuture, FutureExt}; | |
| use hyper::body::{self}; | |
| use hyper::server::conn::Http; | |
| use hyper::service::service_fn; | |
| use hyper::{Body, Request}; |