{"id":24967347,"url":"https://github.com/artrixdotdev/media-proxy","last_synced_at":"2025-03-29T03:13:06.283Z","repository":{"id":122278223,"uuid":"488433798","full_name":"artrixdotdev/media-proxy","owner":"artrixdotdev","description":"A simplistic yet flexible way to proxy your media.","archived":false,"fork":false,"pushed_at":"2022-05-21T03:53:42.000Z","size":149,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T12:54:15.121Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/artrixdotdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-04T02:57:39.000Z","updated_at":"2022-05-23T15:49:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e7a1e48-e3e7-4ed1-8edd-41e9996a2891","html_url":"https://github.com/artrixdotdev/media-proxy","commit_stats":null,"previous_names":["artrixdotdev/media-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artrixdotdev%2Fmedia-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artrixdotdev%2Fmedia-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artrixdotdev%2Fmedia-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artrixdotdev%2Fmedia-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artrixdotdev","download_url":"https://codeload.github.com/artrixdotdev/media-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246131327,"owners_count":20728303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-03T12:53:21.422Z","updated_at":"2025-03-29T03:13:06.256Z","avatar_url":"https://github.com/artrixdotdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Node Media Proxy\n\nA simplistic yet flexible way to proxy your media.\n\n\n## Features\n\n- 🔴 Simple HLS Integration.\n- 🧩 Express compatable.\n- 🔌 Plugin-based Ecosystem.\n- 🍃 Lightweight.\n- ⚡ Easy to set up.\n\n\n## Installation\n\nInstall with npm\n\n```bash\n  npm install media-proxy\n```\n\nInstall with yarn\n\n```bash\nyarn add media-proxy\n```\n    \n## Usage/Examples\n\n\n### Server\n\n#### Standalone\n```js\nconst { Proxy } = require('media-proxy');\nconst proxy = new Proxy({\n    port: 8080\n}); // Server listens by default\n```\n\n#### Express\n\n```js\nconst app = require('express')();\n\nconst { Proxy } = require('media-proxy');\n\nconst proxy = new Proxy();\n\napp.use('/proxy', proxy.asRouter());\n\napp.listen(8080);\n```\n\n### Client\n\n#### Browser\n```js\nconst video = document.getElementById('#my-video');\n\nconst options = {\n    url: 'https://example.com/example.mp4',\n    headers: {\n        referrer: 'https://example.com'\n    }\n};\n\nconst base64 = window.btoa(JSON.stringify(options));\n\nconst url = `http://localhost:8080/mpeg/${base64}`;\n\nvideo.src = url;\n\n```\n\n#### Node\n```js\nconst options = {\n    url: 'https://example.com/example.mp4',\n    headers: {\n        referrer: 'https://example.com'\n    }\n};\n\nconst base64 = Buffer\n    .from(JSON.stringify(options))\n    .toString('base64url'); // Use base64url and not base64\n\nconst url = `http://localhost:8080/mpeg/${base64}`;\n...\n```\n\n\n\n\n\n\n\n## API Reference\n\nWIP","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartrixdotdev%2Fmedia-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartrixdotdev%2Fmedia-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartrixdotdev%2Fmedia-proxy/lists"}