{"id":17119099,"url":"https://github.com/victorges/livepeer-web-api-proxy","last_synced_at":"2025-03-24T02:19:10.707Z","repository":{"id":69945849,"uuid":"447723410","full_name":"victorges/livepeer-web-api-proxy","owner":"victorges","description":"Proxy for limited access to the Livepeer API for the web.","archived":false,"fork":false,"pushed_at":"2022-01-15T01:45:49.000Z","size":208,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T08:23:42.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/victorges.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-01-13T19:18:05.000Z","updated_at":"2023-10-07T17:35:57.000Z","dependencies_parsed_at":"2023-02-27T16:01:00.225Z","dependency_job_id":null,"html_url":"https://github.com/victorges/livepeer-web-api-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorges%2Flivepeer-web-api-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorges%2Flivepeer-web-api-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorges%2Flivepeer-web-api-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorges%2Flivepeer-web-api-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victorges","download_url":"https://codeload.github.com/victorges/livepeer-web-api-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245195962,"owners_count":20575938,"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":"2024-10-14T17:56:17.421Z","updated_at":"2025-03-24T02:19:10.687Z","avatar_url":"https://github.com/victorges.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# livepeer-web-api-proxy\n\nProxy for limited access to the Livepeer API for the web.\n\nNotice that by default it allows anyone to create a new stream. \nImplement your own authentication method if security and billing are of concern.\n\nThe point of this proxy is for anyone to run a simple proxy to the Livepeer API, \nto allow creating streams directly from the browser without exposing access to\nyour whole account via your API key.\n\n## Getting Started\n\nYou must have 3 main tools installed on your machine:\n - `node` / `yarn` for tooling and development: https://nodejs.org/en/download/\n - `flyctl` for deployment: https://fly.io/docs/getting-started/installing-flyctl/\n - `docker` which is required by `flyctl` for building your image: https://docs.docker.com/engine/install/\n\nHaving those tools installed, you can:\n - Create your [fly.io](https://fly.io) account\n\u003e Notice that you might be required to add a credit card or some pre-paid balance to \n\u003e your [fly.io](https://fly.io) account. You won't have to actually pay anything or \n\u003e spend any of that balance though as long as you stick to this guide and only keep \n\u003e 1 single-region instance of your application running.\n - Clone this repository\n - Create your Livepeer API Key on your dashboard: https://livepeer.com/dashboard/developers/api-keys\n - Run `yarn fly` to create a new deployment on `flyctl`.\n   - Choose whatever region works best for you. Either the closest one to you or to your users.\n   - You will also be prompted for your API key created above.\n - Done! You can now call `POST https://\u003cyour app name\u003e.fly.dev/api/stream/init` from your \nwebapp to get or create a stream for each user.\n   - The user will get a cookie that lasts 7 days so they can keep accessing the same stream.\n - From your web app, you can also use [webrtmp-sdk](https://www.npmjs.com/package/@livepeer/webrtmp-sdk) to stream\ndirectly from the browser, after you have obtained a `streamKey` from the API call above.\n\n## Maintaining\n\nAfter the first deployment, you can also iterate on the live deployment leveraging fly.io features: \n - To update the API key that the proxy uses: `yarn fly:api-key` \n - To update the code that the proxy runs, you can change it at will and run: `yarn fly:deploy`\n - Notice that for building locally and get all development tools you might need to setup local dev environment with `yarn install`\n\n## Contribution\n\nFeel free to fork, send pull requests, or modify this project at your own benefit! \n\nIt's meant just as a sample application to get started, but more complex uses might\ncertainly require changing how it works.\n\nFor example you might want to increment the API proxy logic to have some kind of \ntoken-gating for who could get a stream key or not. You can adapt the logic from\nthis other token-gating project to only create streams for users with allowed Ethereum\naddresses: https://github.com/livepeer/livepeer-nft-gate-example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorges%2Flivepeer-web-api-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorges%2Flivepeer-web-api-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorges%2Flivepeer-web-api-proxy/lists"}