Learn how to upload and play back videos on IPFS using Livepeer
This tutorial is based on Livepeer React version 3.9 or earlier, which is now
deprecated. Please ensure that you use Livepeer React version 4 or later, with
the new Livepeer JavaScript SDK. The integration process may appear different,
but the underlying concepts remain same.
IPFS is a decentralized peer-to-peer network that allows anyone to store and
share files. Unlike traditional centralized storage systems, IPFS stores data
across a network of distributed nodes, making it impossible to tamper with or
lose data.In this tutorial, you will learn how to use Livepeer to upload, transcode, and
playback videos on IPFS using Livepeer.
Prerequisites
Before you start with this tutorial, make sure you have the following tools
installed on your machine:
First, let’s create a directory for your project and initialize a Next.js app
using the following command in your terminal:
npx create-next-app .
This will create a new Next.js app in the current directory and install all the
necessary dependencies.Next, let’s install the @livepeer/react, library which we will use to
integrate Livepeer:
npm install @livepeer/react dotenv
Adding TailwindCSS
Tailwind CSS is a utility-first CSS framework that enables you to rapidly build
user interfaces. We will use it to style our app. First, we need to install the
tailwindcss, postcss, and autoprefixerdependencies. These dependencies are
necessary for TailwindCSS to work properly in a Next.js app.Run the following command to install them:
Once the dependencies are installed, we need to initiate the Tailwind CSS. This
will create the necessary configuration files and allow you to customize the
default Tailwind CSS styles. To do that, run the below code in your terminal.
npx tailwind init -p
The above command will generate two files named tailwind.config.js
and postcss.config.js. These files contain the configuration for Tailwind CSS
and PostCSS, respectively. Next, open the tailwind.config.js file in code
editor of your choice and replace its contents with the following code:
The above code tells Tailwind CSS which files to process. At last, add the
tailwind directives for each of Tailwind’s layers to the ./styles/globals.css
file.
You can also check if Tailwind CSS is integrated successfully by updating the
code inside of the pages/index.js file, with below code.
<div className="flex flex-col justify-center items-center h-screen font-poppins"> <h1 className="text-9xl font-bold text-slate-900 text-transparent bg-clip-text bg-gradient-to-r from-[#00A660] to-[#28CE88]"> Livepeer x IPFS </h1> <h3 className="text-xl mt-6 text-slate-800 w-[50%] text-center"> Upload, stream, and transcode video on the decentralized web with Livepeer and IPFS. </h3></div>
Save the file and run npm run dev to start the next.js app and you should see
a similar page.
Integrating Livepeer
Livepeer is a decentralized video platform that allows users to upload,
transcode, and serve video content. The Livepeer React SDK provides a set of
ready-to-use hooks that make it easy to integrate Livepeer into a project.To get started, navigate
to https://livepeer.studio/register and
create a new account on Livepeer Studio. This will give you access to your
Livepeer dashboard, where you can manage your account and access your API keys.Once you have created an account, in the dashboard, click on the Developers on
the sidebar.
Then, click on Create API Key, give a name to your key and then copy it as we
will need it later.To use Livepeer React in your project, create a new directory named clientin
the root directory, and add the following code to index.js
Make sure to replace the YOUR_API_KEY with the key which you just copied from
the Livepeer dashboard. And also replace the code inside of _app.js in the
page directory with the below code.
And that is it, you can now use Livepeer to upload and transcode assets.Create a components folder named and inside of it create a new file named
Button.js. Add the below code to it.
Next, create a useState named asset and also a reference for the file input.
// State for the assetconst [asset, setAsset] = useState(null);// Ref for the file inputconst fileInput = useRef(null);
I have already commented on each line of the code so you can understand what is
going on.
const ChooseAsset = async () => { // When user clicks the button, open the file input dialog ref.current?.click();};const onChange = async (e) => { // Get the file const file = e.target.files?.[0]; // If no file, return if (!file) return; // If there is a file, set the asset state to the file setAsset(file);};const uploadAsset = async () => {};
Save the file and now you should be able to select a file from your computer.Next, import the useCreateAsset from the @livepeer/react and add the hook to
the index.js file.
By default, the assets which you upload would be saved on Livepeer’ storage. If
you want to upload the videos to IPFS, you can use useUpdateAsset hook from
Livepeer React or Livepeer Studio’s REST API. In this tutorial we will be using
the Livepeer React hooks.Import the useUpdateAsset hook from the livepeer.js and add it after the
useCreateAsset
const { mutate: updateAsset, status } = useUpdateAsset({ // Here we are providing the assetId of the video assetId: assets?.[0].id, // And choose IPFS : true to make sure the video is uploaded to IPFS storage: { ipfs: true },});
And also include a Button to call the updateAsset hook in the map function:
<Button onClick={() => updateAsset?.()}>Upload to IPFS</Button>
If you have saved your videos on other IPFS services like web3.storage, you can
easily playback them using Livepeer’s decentralized storage player. This player
transcodes your videos to ensure that they playback smoothly and without any
issues.This can be useful for ensuring that your videos are of high quality and that
they are accessible to a wide range of viewers, regardless of their device or
connection speed.
Last modified on April 7, 2026
Was this page helpful?
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"Livepeer Docs","colors":{"primary":"#3CB540","light":"#2b9a66","dark":"#3CB540"},"logo":{"light":"https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/tdgVQ14Wt8cgTvJN/snippets/assets/logos/light.svg?fit=max\u0026auto=format\u0026n=tdgVQ14Wt8cgTvJN\u0026q=85\u0026s=0d906cdf330039e031b052442e85a2da","dark":"https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/tdgVQ14Wt8cgTvJN/snippets/assets/logos/dark.svg?fit=max\u0026auto=format\u0026n=tdgVQ14Wt8cgTvJN\u0026q=85\u0026s=92bdf3bd6b00b01c25499d14ff93ec2b"},"favicon":"/snippets/assets/logos/favicon/favicon.png","api":{"openapi":"api/openapi.yaml","mdx":{"server":"https://livepeer.studio/api"}},"appearance":{"default":"dark"},"navbar":{"links":[{"icon":"x-twitter","href":"https://twitter.com/Livepeer","label":""},{"icon":"github","href":"https://github.com/livepeer","label":""},{"icon":"discord","href":"https://discord.gg/livepeer","label":""}]},"footer":{"socials":{"website":"https://forum.livepeer.org","github":"https://github.com/livepeer","twitter":"https://twitter.com/livepeer","discord":"https://discord.gg/livepeer","linkedin":"https://www.linkedin.com/company/livepeer"}},"search":{"prompt":"Need help? Ask our AI"},"styling":{"codeblocks":{"theme":{"light":"github-light","dark":"dark-plus"}}},"integrations":{"ga4":{"measurementId":"G-P1Z15F6NX4"}},"errors":{"404":{"redirect":false,"title":"Ruh oh. This page doesn't exist.","description":"\u003cFrame>\u003cimg src=\"https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExN2FteDJ4bno5MHU5Y3QxdGx3eWR2emdhejRhc2c1Y2d3ejY5ajlxMSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/Ju7l5y9osyymQ/giphy.gif\" alt=\"Rick Roll\" />\u003c/Frame>\u003cbr/>\u003cbr/>Sorry About That."}},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"na-36-fix-simplify-ubuntu-deps","hasAudioNarration":false,"actualSubdomain":"na-36-fix-simplify-ubuntu-deps","customDomains":[],"gitSource":{"type":"github","owner":"livepeer","repo":"docs","deployBranch":"fix/simplify-ubuntu-deps","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":false,"issues":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"}},"buildId":"69d4ec28fb8ada5118d94017:success","clientVersion":"0.0.4410","preview":{"mainDeploymentId":"64ba6ae116af7b43c2e91ffc","mainDeployment":{"subdomain":"na-36","customDomains":["docs.livepeer.org"],"basePath":""}},"searchFilterCounts":[]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"preview":{"mainDeploymentId":"64ba6ae116af7b43c2e91ffc","mainDeployment":{"subdomain":"na-36","customDomains":["docs.livepeer.org"],"basePath":""}},"editorBaseUrl":"https://app.mintlify.com/na-36/na-36/editor/fix%2Fsimplify-ubuntu-deps/~","googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"body{padding:0!important}:root{--lp-color-accent: #3cb540;--lp-color-accent-strong: #18794e;--lp-color-accent-soft: #6bbf59;--lp-color-accent-bright: #5dd662;--lp-color-accent-brightest: #a0f0a5;--lp-color-arbitrum: #3ea6f8;--lp-color-text-primary: #181c18;--lp-color-text-secondary: #717571;--lp-color-text-muted: #9ca3af;--lp-color-bg-page: #ffffff;--lp-color-bg-card: #f9fafb;--lp-color-bg-elevated: #f3f6f4;--lp-color-bg-subtle: rgba(24, 28, 24, 0.04);--lp-color-bg-overlay: rgba(12, 12, 12, 0.5);--lp-color-border-default: #e5e7eb;--lp-color-border-strong: rgba(24, 28, 24, 0.18);--lp-color-border-inverse: rgba(255, 255, 255, 0.5);--lp-color-on-accent: #ffffff;--lp-color-link: #18794e;--lp-color-link-hover: #004225;--lp-color-brand-discord: #5865f2;--lp-color-brand-forum: #00aeef;--lp-color-brand-github: #181c18;--lp-color-brand-x: #181c18;--lp-color-brand-globe: #00c0ff;--lp-color-brand-twitch: #9048ff;--lp-color-brand-youtube: #ff0034;--lp-color-brand-instagram: #dc2275;--lp-color-brand-linkedin: #0189df;--lp-color-brand-preview: #b636dd;--lp-color-brand-coming-soon: #ef1a73;--lp-color-status-good: #22c55e;--lp-color-status-warn: #fbbf24;--lp-color-status-bad: #ef4444;--lp-spacing-1: 0.25rem;--lp-spacing-2: 0.5rem;--lp-spacing-3: 0.75rem;--lp-spacing-4: 1rem;--lp-spacing-6: 1.5rem;--lp-spacing-8: 2rem;--lp-font-sans: 'Inter', 'Segoe UI', sans-serif;--lp-font-mono: 'SFMono-Regular', 'SF Mono', 'Menlo', monospace;--lp-radius-sm: 0.25rem;--lp-radius-md: 0.5rem;--lp-radius-lg: 0.75rem;--lp-shadow-card: 0 8px 24px rgba(24, 28, 24, 0.08);--lp-z-base: 1;--lp-z-overlay: 10;--lp-z-modal: 50;--accent: var(--lp-color-accent);--accent-dark: var(--lp-color-accent-strong);--hero-text: var(--lp-color-text-primary);--text: var(--lp-color-text-secondary);--text-secondary: var(--lp-color-text-secondary);--muted-text: var(--lp-color-text-muted);--background: var(--lp-color-bg-page);--card-background: var(--lp-color-bg-card);--background-highlight: var(--lp-color-bg-subtle);--border: var(--lp-color-border-default);--button-text: var(--lp-color-on-accent);--page-header-description-color: var(--lp-color-text-secondary);--arbitrum: var(--lp-color-arbitrum)}.dark{--lp-color-accent: #2b9a66;--lp-color-accent-strong: #18794e;--lp-color-accent-soft: #3cb540;--lp-color-accent-bright: #5dd662;--lp-color-accent-brightest: #7fe584;--lp-color-text-primary: #e0e4e0;--lp-color-text-secondary: #a0a4a0;--lp-color-text-muted: #6b7280;--lp-color-bg-page: #0d0d0d;--lp-color-bg-card: #1a1a1a;--lp-color-bg-elevated: #141a16;--lp-color-bg-subtle: rgba(255, 255, 255, 0.1);--lp-color-bg-overlay: rgba(0, 0, 0, 0.5);--lp-color-border-default: #333333;--lp-color-border-strong: rgba(255, 255, 255, 0.3);--lp-color-border-inverse: rgba(255, 255, 255, 0.5);--lp-color-on-accent: #ffffff;--lp-color-link: #5dd662;--lp-color-link-hover: #a0f0a5;--lp-color-brand-github: #f0f0f0;--accent: var(--lp-color-accent);--accent-dark: var(--lp-color-accent-strong);--hero-text: var(--lp-color-text-primary);--text: var(--lp-color-text-secondary);--text-secondary: var(--lp-color-text-secondary);--muted-text: var(--lp-color-text-muted);--background: var(--lp-color-bg-page);--card-background: var(--lp-color-bg-card);--background-highlight: var(--lp-color-bg-subtle);--border: var(--lp-color-border-default);--button-text: var(--lp-color-on-accent);--page-header-description-color: var(--lp-color-text-secondary);--arbitrum: var(--lp-color-arbitrum)}.nav-tabs{width:100%;justify-content:flex-start}@media (min-width: 1024px){#content-container:not(:has(.frame-mode-hero-full)):not(:has(.frame-mode-container)){padding-left:3rem!important;padding-right:3rem!important}#content-container:not(:has(.frame-mode-hero-full)):not(:has(.frame-mode-container))>.max-w-5xl{max-width:72rem!important}#content-container:has(.frame-mode-hero-full),#content-container:has(.frame-mode-container){padding-left:2rem!important;padding-right:2rem!important}#content-container:has(.frame-mode-hero-full)>.max-w-5xl,#content-container:has(.frame-mode-container)>.max-w-5xl{max-width:80rem!important}}#navbar>div.z-10.mx-auto.relative>div.hidden.lg\\:flex.px-12.h-12>div{column-gap:2rem!important}a.nav-tabs-item[href*=\"/internal/\"]{margin-left:1rem;margin-right:-1rem;padding-right:0;border-bottom-color:transparent!important}a.nav-tabs-item[href$=\"/resources/redirect\"],a.nav-tabs-item[href$=\"/resources/resources-portal\"],a.nav-tabs-item[href$=\"/07_resources/redirect\"],a.nav-tabs-item[href$=\"/07_resources/resources-portal\"]{margin-left:auto;background-color:transparent;border:1px solid var(--accent)!important;padding:4px 8px;border-radius:4px;font-size:0.7rem;height:auto!important;align-self:center;margin-right:-2rem}a.nav-tabs-item[href$=\"/resources/redirect\"] svg,a.nav-tabs-item[href$=\"/resources/resources-portal\"] svg,a.nav-tabs-item[href$=\"/07_resources/redirect\"] svg,a.nav-tabs-item[href$=\"/07_resources/resources-portal\"] svg,a.nav-tabs-item[href$=\"/07_resources/resources_hub\"] svg{height:0.75rem;width:0.75rem}a.nav-tabs-item[href$=\"/resources/redirect\"]>div:last-child,a.nav-tabs-item[href$=\"/resources/resources-portal\"]>div:last-child,a.nav-tabs-item[href$=\"/07_resources/redirect\"]>div:last-child,a.nav-tabs-item[href$=\"/07_resources/resources-portal\"]>div:last-child,a.nav-tabs-item[href$=\"/07_resources/resources_hub\"]>div:last-child{display:none}#footer .flex-col .flex.gap-4{flex-direction:column!important;gap:0rem!important}#footer>div{padding-top:2rem!important;padding-bottom:1rem!important}#chat-assistant-sheet[aria-hidden=\"true\"]{display:none!important}button.text-left.text-gray-600.text-sm.font-medium{min-height:24px;padding-top:4px;padding-bottom:4px}[data-component-part=\"card-content-container\"]{padding-right:2.5rem}.code-block>div>div>svg{background-color:#18794e!important}#error-description>span>div>div{border:1px solid #18794e!important}body>div.relative.antialiased.text-gray-500.dark\\:text-gray-400>div.peer-\\[\\.is-not-custom\\]\\:lg\\:flex.peer-\\[\\.is-custom\\]\\:\\[\\\u0026\\>div\\:first-child\\]\\:\\!hidden.peer-\\[\\.is-custom\\]\\:\\[\\\u0026\\>div\\:first-child\\]\\:sm\\:\\!hidden.peer-\\[\\.is-custom\\]\\:\\[\\\u0026\\>div\\:first-child\\]\\:md\\:\\!hidden.peer-\\[\\.is-custom\\]\\:\\[\\\u0026\\>div\\:first-child\\]\\:lg\\:\\!hidden.peer-\\[\\.is-custom\\]\\:\\[\\\u0026\\>div\\:first-child\\]\\:xl\\:\\!hidden>div.flex.flex-col.items-center.justify-center.w-full.max-w-lg.overflow-x-hidden.mx-auto.py-48.px-5.text-center.\\*\\:text-center.gap-y-8.not-found-container>div{margin-top:-5rem}#error-description>span>div>div>div.relative.rounded-xl.overflow-hidden.flex.justify-center>img{width:500px;aspect-ratio:4 / 3;object-fit:cover}#content>div.steps.ml-3\\.5.mt-10.mb-6>div>div.w-full.overflow-hidden.pl-8.pr-px>p{color:#2b9a66!important}.dark .bg-white\\/\\[0\\.95\\].multi-view-dropdown-trigger{background-color:transparent!important;background:none!important}#table-of-contents-layout:empty,#content-side-layout:has(#table-of-contents-layout:empty){display:none}[data-docs-dynamic-table]{table-layout:fixed!important}[data-docs-styled-table-shell]>div{padding-top:0!important;padding-bottom:0!important;margin-top:0!important;margin-bottom:0!important}[data-docs-bordered-box]>:first-child{margin-top:0!important}[data-docs-bordered-box]>:last-child{margin-bottom:0!important}[data-docs-bordered-box][data-accent-bar]::before{content:\"\";position:absolute;top:0;bottom:0;left:0;width:4px;background-color:var(--accent-bar-color);border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}.frame-mode-container{width:calc(100% + 96px + 20px);margin-left:-96px;margin-right:-20px;margin-bottom:2rem;padding-left:15%;padding-right:15%;box-sizing:border-box}.frame-mode-hero-full .frame-mode-container{width:100%;margin-left:0;margin-right:0;padding-left:0%;padding-right:0%}[data-page-mode=\"frame\"] #pagination{width:calc(100% + 96px + 20px);margin-left:-96px;margin-right:-20px;padding-left:calc((100% + 96px + 20px) * 0.1 + 96px);padding-right:calc((100% + 96px + 20px) * 0.1 + 20px);box-sizing:border-box}.frame-mode-hero-full{width:calc(100% + 96px + 20px);margin-left:-96px;margin-right:-20px;position:relative}@media (max-width: 1023px){.frame-mode-container{width:100%;margin-left:0;margin-right:0;padding-left:1rem;padding-right:1rem}[data-page-mode=\"frame\"] #pagination{width:100%;margin-left:0;margin-right:0;padding-left:1rem;padding-right:1rem}.frame-mode-hero-full{width:100%;margin-left:0;margin-right:0}}#starfield{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}.frame-mode-hero-full [data-component-part=\"card-content-container\"]{padding-top:0.5rem;padding-bottom:0.5rem;padding-left:1rem;padding-right:2.5rem}.frame-mode-hero-full #card-link-arrow-icon{top:0.75rem;right:0.75rem}"}]}
{"page":{"pagePath":"v1/developers/tutorials/upload-playback-videos-on-ipfs","slug":"/v1/developers/tutorials/upload-playback-videos-on-ipfs","pageMetadata":{"title":"Play from IPFS","description":"Learn how to upload and play back videos on IPFS using Livepeer","href":"/v1/developers/tutorials/upload-playback-videos-on-ipfs"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to upload and play back videos on IPFS using Livepeer\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,OptimizedImage,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Warning,{children:_jsx(_components.p,{children:`This tutorial is based on Livepeer React version 3.9 or earlier, which is now\ndeprecated. Please ensure that you use Livepeer React version 4 or later, with\nthe new Livepeer JavaScript SDK. The integration process may appear different,\nbut the underlying concepts remain same.`})}),`\n`,_jsx(_components.p,{children:`IPFS is a decentralized peer-to-peer network that allows anyone to store and\nshare files. Unlike traditional centralized storage systems, IPFS stores data\nacross a network of distributed nodes, making it impossible to tamper with or\nlose data.`}),`\n`,_jsx(_components.p,{children:`In this tutorial, you will learn how to use Livepeer to upload, transcode, and\nplayback videos on IPFS using Livepeer.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before you start with this tutorial, make sure you have the following tools\ninstalled on your machine:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://nodejs.org/en/`,children:`Node.js`}),` v16 or later`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`setting-up-next-js-app`,children:`Setting up Next.js App`}),`\n`,_jsx(_components.p,{children:`First, let’s create a directory for your project and initialize a Next.js app\nusing the following command in your terminal:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`npx`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` create-next-app`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` .`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This will create a new Next.js app in the current directory and install all the\nnecessary dependencies.`}),`\n`,_jsxs(_components.p,{children:[`Next, let’s install the `,_jsx(_components.code,{children:`@livepeer/react`}),`, library which we will use to\nintegrate Livepeer:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` @livepeer/react`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` dotenv`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`adding-tailwindcss`,children:`Adding TailwindCSS`}),`\n`,_jsxs(_components.p,{children:[`Tailwind CSS is a utility-first CSS framework that enables you to rapidly build\nuser interfaces. We will use it to style our app. First, we need to install the\n`,_jsx(_components.code,{children:`tailwindcss`}),`, `,_jsx(_components.code,{children:`postcss`}),`, and `,_jsx(_components.code,{children:`autoprefixer`}),`dependencies. These dependencies are\nnecessary for TailwindCSS to work properly in a Next.js app.`]}),`\n`,_jsx(_components.p,{children:`Run the following command to install them:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` --dev`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` tailwindcss`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` postcss`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` autoprefixer`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Once the dependencies are installed, we need to initiate the Tailwind CSS. This\nwill create the necessary configuration files and allow you to customize the\ndefault Tailwind CSS styles. To do that, run the below code in your terminal.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`npx`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` tailwind`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` init`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -p`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The above command will generate two files named\\xA0`,_jsx(_components.code,{children:`tailwind.config.js`}),`\n\\xA0and\\xA0`,_jsx(_components.code,{children:`postcss.config.js`}),`. These files contain the configuration for Tailwind CSS\nand PostCSS, respectively. Next, open the `,_jsx(_components.code,{children:`tailwind.config.js`}),` file in code\neditor of your choice and replace its contents with the following code:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`module`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`exports`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` content:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"./pages//*.{js,ts,jsx,tsx}\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"./components//*.{js,ts,jsx,tsx}\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` theme:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` extend:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` plugins:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The above code tells Tailwind CSS which files to process. At last, add the\ntailwind directives for each of Tailwind’s layers to the \\xA0`,_jsx(_components.code,{children:`./styles/globals.css`}),`\nfile.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`css`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`css`,children:_jsxs(_components.code,{language:`css`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`@tailwind`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` base;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`@tailwind`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` components;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`@tailwind`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` utilities;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can also check if Tailwind CSS is integrated successfully by updating the\ncode inside of the\\xA0`,_jsx(_components.code,{children:`pages/index.js`}),` file, with below code.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"flex flex-col justify-center items-center h-screen font-poppins\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text-9xl font-bold text-slate-900 text-transparent bg-clip-text bg-gradient-to-r from-[#00A660] to-[#28CE88]\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` Livepeer x IPFS`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h3`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text-xl mt-6 text-slate-800 w-[50%] text-center\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` Upload, stream, and transcode video on the decentralized web with Livepeer`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` and IPFS.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h3`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Save the file and run\\xA0`,_jsx(_components.code,{children:`npm run dev`}),` to start the next.js app and you should see\na similar page.`]}),`\n`,_jsx(Heading,{level:`2`,id:`integrating-livepeer`,children:`Integrating Livepeer`}),`\n`,_jsx(_components.p,{children:`Livepeer is a decentralized video platform that allows users to upload,\ntranscode, and serve video content. The Livepeer React SDK provides a set of\nready-to-use hooks that make it easy to integrate Livepeer into a project.`}),`\n`,_jsxs(_components.p,{children:[`To get started, navigate\nto\\xA0`,_jsx(_components.a,{href:`https://livepeer.studio/register`,children:`https://livepeer.studio/register`}),` and\ncreate a new account on Livepeer Studio. This will give you access to your\nLivepeer dashboard, where you can manage your account and access your API keys.`]}),`\n`,_jsx(_components.p,{children:`Once you have created an account, in the dashboard, click on the\\xA0Developers on\nthe sidebar.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/Sws_Qz6vp4ABJiWR/v1/images/tutorials/studio-create-api.png?fit=max\u0026auto=format\u0026n=Sws_Qz6vp4ABJiWR\u0026q=85\u0026s=9ede3c7150c8b52aa1e9dc7e5e278535`,alt:`Livepeer Studio, API key page`,\"data-og-width\":`3042`,width:`3042`,\"data-og-height\":`2058`,height:`2058`,\"data-path\":`v1/images/tutorials/studio-create-api.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/Sws_Qz6vp4ABJiWR/v1/images/tutorials/studio-create-api.png?w=280\u0026fit=max\u0026auto=format\u0026n=Sws_Qz6vp4ABJiWR\u0026q=85\u0026s=e16104bfd4801172d102898bdc26e42c 280w, https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/Sws_Qz6vp4ABJiWR/v1/images/tutorials/studio-create-api.png?w=560\u0026fit=max\u0026auto=format\u0026n=Sws_Qz6vp4ABJiWR\u0026q=85\u0026s=9ce4e1c5febd537de0a5e3c278a9f17f 560w, https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/Sws_Qz6vp4ABJiWR/v1/images/tutorials/studio-create-api.png?w=840\u0026fit=max\u0026auto=format\u0026n=Sws_Qz6vp4ABJiWR\u0026q=85\u0026s=0513418d0b7050285c130d4961010832 840w, https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/Sws_Qz6vp4ABJiWR/v1/images/tutorials/studio-create-api.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Sws_Qz6vp4ABJiWR\u0026q=85\u0026s=d9cee77aa54a7e10016fd5f2d04d799b 1100w, https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/Sws_Qz6vp4ABJiWR/v1/images/tutorials/studio-create-api.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Sws_Qz6vp4ABJiWR\u0026q=85\u0026s=02713d5176fdc4a383a7ca6f1bdab118 1650w, https://mintcdn.com/na-36-fix-simplify-ubuntu-deps/Sws_Qz6vp4ABJiWR/v1/images/tutorials/studio-create-api.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Sws_Qz6vp4ABJiWR\u0026q=85\u0026s=e75bc4853c8b5157524132d736070529 2500w`})}),`\n`,_jsx(_components.p,{children:`Then, click on\\xA0Create API Key, give a name to your key and then copy it as we\nwill need it later.`}),`\n`,_jsxs(_components.p,{children:[`To use Livepeer React in your project, create a new directory named `,_jsx(_components.code,{children:`client`}),`in\nthe root directory, and add the following code to `,_jsx(_components.code,{children:`index.js`})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`createReactClient`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`studioProvider`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"@livepeer/react\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` LivepeerClient`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` createReactClient`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` provider:`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` studioProvider`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` LivepeerClient`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Make sure to replace the\\xA0`,_jsx(_components.code,{children:`YOUR_API_KEY`}),` with the key which you just copied from\nthe Livepeer dashboard. And also replace the code inside of\\xA0`,_jsx(_components.code,{children:`_app.js`}),` in the\npage directory with the below code.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`LivepeerConfig`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"@livepeer/react\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` LivepeerClient`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"../client\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"../styles/globals.css\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` MyApp`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`Component`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`pageProps`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`LivepeerConfig`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`LivepeerClient`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`Component`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:` {`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`pageProps`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`LivepeerConfig`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` MyApp`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`And that is it, you can now use Livepeer to upload and transcode assets.`}),`\n`,_jsxs(_components.p,{children:[`Create a components folder named and inside of it create a new file named\n`,_jsx(_components.code,{children:`Button.js`}),`. Add the below code to it.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` React`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"react\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` Button`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`children`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`onClick`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`button`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"bg-slate-900 text-white py-3 px-8 rounded-full mt-4\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`onClick`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` >`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:` {`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`children`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Next, in the `,_jsx(_components.code,{children:`pages/index.js`}),` file, import the Button component and add it below\nthe `,_jsx(_components.code,{children:`p`}),` tag. This is how your file should look like`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` Button`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"../components/Button\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` Home`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"flex flex-col justify-center items-center h-screen font-poppins\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text-9xl font-bold text-slate-900 text-transparent bg-clip-text bg-gradient-to-r from-[#00A660] to-[#28CE88]\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` Livepeer x IPFS`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h3`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text-xl mt-6 text-slate-800 w-[50%] text-center\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` Upload, stream, and transcode video on the decentralized web with`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` Livepeer and IPFS.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h3`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`Button`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` uploadAsset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` ChooseAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:` {`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Upload the asset\"`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Choose an asset\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`Button`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Add the file input with class name hidden below the Button component.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`input`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"file\"`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` ref`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`fileInput`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"hidden\"`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` onChange`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`onChange`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Next, create a useState named asset and also a reference for the file input.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:`// State for the asset`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`setAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useState`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:`// Ref for the file input`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` fileInput`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useRef`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`I have already commented on each line of the code so you can understand what is\ngoing on.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` ChooseAsset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // When user clicks the button, open the file input dialog`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` ref`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`current`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`click`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` onChange`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // Get the file`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` file`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`target`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`files`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // If no file, return`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`file`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // If there is a file, set the asset state to the file`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` setAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`file`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` uploadAsset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {};`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Save the file and now you should be able to select a file from your computer.`}),`\n`,_jsxs(_components.p,{children:[`Next, import the `,_jsx(_components.code,{children:`useCreateAsset`}),` from the `,_jsx(_components.code,{children:`@livepeer/react`}),` and add the hook to\nthe index.js file.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` mutate`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`createAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`assets`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` error`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useCreateAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` asset`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` sources:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`file:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Update the `,_jsx(_components.code,{children:`uploadAsset`}),` function and save the files. You can now choose and\nupload videos to Livepeer.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` uploadAsset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` createAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You can also add the below code to check the progress of the asset\nupload/transcode.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` progressFormatted`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useMemo`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"failed\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Failed to process video.\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"waiting\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Waiting\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"uploading\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:\" `Uploading: \"}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`round`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`]?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:\"%`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"processing\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:\" `Processing: \"}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`round`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:\"%`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Now, let’s also print the asset information once it is uploaded successfully. To\ndo that simply add the below code below the input tag.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` assets`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` key`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`Asset Name: `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`Playback URL: `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`playbackUrl`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`IPFS CID: `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`storage`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`ipfs`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`cid`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"None\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ));`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Finally this is how your code should look like:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`86`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`86`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`useCreateAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"@livepeer/react\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`useMemo`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`useRef`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`useState`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"react\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` Button`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"../components/Button\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` default`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` Home`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // State for the asset`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`setAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useState`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // Ref for the file input`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` fileInput`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useRef`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` mutate`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`createAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`assets`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` error`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useCreateAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` asset`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` sources:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`file:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` ChooseAsset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // When user clicks the button, open the file input dialog`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` fileInput`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`current`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`click`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` onChange`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // Get the file`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` file`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`target`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`files`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // If no file, return`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`file`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // If there is a file, set the asset state to the file`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` setAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`file`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` uploadAsset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` createAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` progressFormatted`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useMemo`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"failed\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Failed to process video.\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"waiting\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Waiting\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"uploading\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:\" `Uploading: \"}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`round`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`]?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:\"%`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`phase`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"processing\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:\" `Processing: \"}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`round`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:\"%`\"})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progress`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"flex flex-col justify-center items-center h-screen font-poppins\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text-9xl font-bold text-slate-900 text-transparent bg-clip-text bg-gradient-to-r from-[#00A660] to-[#28CE88]\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` Livepeer x IPFS`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h3`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text-xl mt-6 text-slate-800 w-[50%] text-center\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` Upload, stream, and transcode video on the decentralized web with`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` Livepeer and IPFS.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`h3`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`Button`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` uploadAsset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` ChooseAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:` {`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Upload the asset\"`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Choose an asset\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`Button`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`input`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"file\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` ref`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`fileInput`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` className`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"hidden\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` onChange`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`onChange`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` />`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`p`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`progressFormatted`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`p`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:` {`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`assets`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` key`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`Asset Name: `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`Playback URL: `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`playbackUrl`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`IPFS CID: `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`asset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`storage`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`ipfs`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`cid`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"None\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ))`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Go ahead choose and upload a video and then navigate to\n`,_jsx(_components.a,{href:`https://livepeer.studio/dashboard/assets`,children:`https://livepeer.studio/dashboard/assets`}),`\nyou should be able to see the video which you just uploaded.`]}),`\n`,_jsx(Heading,{level:`2`,id:`uploading-videos-to-ipfs`,children:`Uploading Videos To IPFS`}),`\n`,_jsxs(_components.p,{children:[`By default, the assets which you upload would be saved on Livepeer’ storage. If\nyou want to upload the videos to IPFS, you can use `,_jsx(_components.code,{children:`useUpdateAsset`}),` hook from\nLivepeer React or Livepeer Studio’s REST API. In this tutorial we will be using\nthe Livepeer React hooks.`]}),`\n`,_jsxs(_components.p,{children:[`Import the `,_jsx(_components.code,{children:`useUpdateAsset`}),` hook from the livepeer.js and add it after the\nuseCreateAsset`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`mutate`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`updateAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`status`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` useUpdateAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // Here we are providing the assetId of the video`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` assetId:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` assets`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A9955`},children:` // And choose IPFS : true to make sure the video is uploaded to IPFS`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` storage:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`ipfs:`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`And also include a Button to call the updateAsset hook in the map function:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`Button`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#9CDCFE`},children:` onClick`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` updateAsset`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.()`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`Upload to IPFS`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4EC9B0`},children:`Button`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`If you have saved your videos on other IPFS services like web3.storage, you can\neasily playback them using Livepeer’s decentralized storage player. This player\ntranscodes your videos to ensure that they playback smoothly and without any\nissues.`}),`\n`,_jsx(_components.p,{children:`This can be useful for ensuring that your videos are of high quality and that\nthey are accessible to a wide range of viewers, regardless of their device or\nconnection speed.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"dark-plus"}},"config":{},"pageMetadata":{"title":"Play from IPFS","description":"Learn how to upload and play back videos on IPFS using Livepeer","href":"/v1/developers/tutorials/upload-playback-videos-on-ipfs"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Setting up Next.js App","slug":"setting-up-next-js-app","depth":2,"children":[{"title":"Adding TailwindCSS","slug":"adding-tailwindcss","depth":3,"children":[]}]},{"title":"Integrating Livepeer","slug":"integrating-livepeer","depth":2,"children":[]},{"title":"Uploading Videos To IPFS","slug":"uploading-videos-to-ipfs","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/na-36-fix-simplify-ubuntu-deps/86044cb4146efff0/snippets/components/integrators/feeds/contractVerifierData.js","/_mintlify/custom/na-36-fix-simplify-ubuntu-deps/943f25bb7ac7d121/snippets/data/contract-addresses/view-model.js","/_mintlify/custom/na-36-fix-simplify-ubuntu-deps/298086d7bf262a7f/snippets/data/gateways/configuration-flags.js","/_mintlify/custom/na-36-fix-simplify-ubuntu-deps/ce2de808f20bf288/snippets/data/social-feeds/transformers/filterVideos.js","/_mintlify/custom/na-36-fix-simplify-ubuntu-deps/cd0b73bc6b3814c0/v2/about/protocol/data/blockchain-contracts-addresses.js","/_mintlify/custom/na-36-fix-simplify-ubuntu-deps/15325830a8aed988/v2/about/protocol/data/blockchain-contracts-links.js"],"subdomain":"na-36-fix-simplify-ubuntu-deps","siteName":"Livepeer Docs","title":"Play from IPFS - Livepeer Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"v1":{"href":"/v1/developers/tutorials/upload-playback-videos-on-ipfs","matchLevel":0},"v2":{"href":"/v2/developers/guides/developer-guides","matchLevel":2}},"firstHrefInLanguage":{"en":{"href":"/v1/developers/tutorials/upload-playback-videos-on-ipfs","matchLevel":0}}},"lastModified":"2026-04-07T11:40:38.836Z","originalFileLocation":"v1/developers/tutorials/upload-playback-videos-on-ipfs.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to upload and play back videos on IPFS using Livepeer\">\u003cmeta data-mint-head name=\"application-name\" content=\"Livepeer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"noindex, nofollow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Play from IPFS - Livepeer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to upload and play back videos on IPFS using Livepeer\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Livepeer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://na-36-fix-simplify-ubuntu-deps.mintlify.app/v1/developers/tutorials/upload-playback-videos-on-ipfs\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://na-36-fix-simplify-ubuntu-deps.mintlify.site/_mintlify/api/og/v2?division=Storage+Provider+Integration\u0026amp;title=Play+from+IPFS\u0026amp;description=Learn+how+to+upload+and+play+back+videos+on+IPFS+using+Livepeer\u0026amp;theme=a301ca5c19b322b9a5838d85\u0026amp;signature=5c84ba084243960646ba8d9e3ef09aa5075d8a7acea4ecffb7265044b7eb2eb8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Play from IPFS - Livepeer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to upload and play back videos on IPFS using Livepeer\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://na-36-fix-simplify-ubuntu-deps.mintlify.site/_mintlify/api/og/v2?division=Storage+Provider+Integration\u0026amp;title=Play+from+IPFS\u0026amp;description=Learn+how+to+upload+and+play+back+videos+on+IPFS+using+Livepeer\u0026amp;theme=a301ca5c19b322b9a5838d85\u0026amp;signature=5c84ba084243960646ba8d9e3ef09aa5075d8a7acea4ecffb7265044b7eb2eb8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/na-36-fix-simplify-ubuntu-deps/n27bjCKXLNvD5Xy-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Livepeer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3CB540\">\u003clink data-mint-head rel=\"canonical\" href=\"https://na-36-fix-simplify-ubuntu-deps.mintlify.app/v1/developers/tutorials/upload-playback-videos-on-ipfs\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v1/developers/tutorials/upload-playback-videos-on-ipfs.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Livepeer Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Livepeer Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v1/developers/tutorials/upload-playback-videos-on-ipfs.md","siteName":"Livepeer Docs","nav":{"global":null,"versions":[{"version":"v1","default":true,"languages":[{"language":"en","dropdowns":[{"dropdown":"Developers","icon":"code","anchors":[{"anchor":"Documentation","icon":"code","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","icon":"hand-wave","href":"/v1/developers/introduction"},{"title":"Quickstart","icon":"bolt","href":"/v1/developers/quick-start"},{"title":"CLI","icon":"rectangle-terminal","href":"/v1/developers/livepeer-studio-cli"}]},{"group":"Guides","pages":[{"icon":"sitemap","title":null,"href":"/v1/developers/guides/overview"},{"group":"Assets","icon":"video","pages":[{"title":"Upload an asset","href":"/v1/developers/guides/upload-video-asset"},{"title":"Play an asset","href":"/v1/developers/guides/playback-an-asset"},{"title":"Listen to asset events","href":"/v1/developers/guides/listen-to-asset-events"},{"title":"Upload encrypted assets","href":"/v1/developers/guides/encrypted-asset"},{"title":"Get an asset thumbnail","href":"/v1/developers/guides/thumbnails-vod"}]},{"group":"Livestream","icon":"camera","pages":[{"title":"Create a livestream","href":"/v1/developers/guides/create-livestream"},{"title":"Play a livestream","href":"/v1/developers/guides/playback-a-livestream"},{"title":"Livestream via OBS","href":"/v1/developers/guides/stream-via-obs"},{"title":"In-browser broadcasting","href":"/v1/developers/guides/livestream-from-browser"},{"title":"Optimize latency","href":"/v1/developers/guides/optimize-latency-of-a-livestream"},{"title":"Monitor stream health","href":"/v1/developers/guides/monitor-stream-health"},{"title":"Listen to stream events","href":"/v1/developers/guides/listen-to-stream-events"},{"title":"Set up a multistream","href":"/v1/developers/guides/multistream"},{"title":"Clip a livestream","href":"/v1/developers/guides/clip-a-livestream"},{"title":"Get a livestream thumbnail","href":"/v1/developers/guides/thumbnails-live"}]},{"group":"Access control","icon":"lock","pages":[{"title":"Control access using webhooks","href":"/v1/developers/guides/access-control-webhooks"},{"title":"Control access using JWTs","href":"/v1/developers/guides/access-control-jwt"}]},{"group":"Webhooks","icon":"bell","pages":[{"title":"Set up and listen for webhooks","href":"/v1/developers/guides/setup-and-listen-to-webhooks"}]},{"group":"Transcode API","icon":"photo-film","pages":[{"title":"Transcode with Storj","href":"/v1/developers/guides/transcode-video-storj"},{"title":"Transcode with W3S","href":"/v1/developers/guides/transcode-video-w3s"}]},{"group":"Viewership Metrics","icon":"chart-bar","pages":[{"title":"Engagement via API","href":"/v1/developers/guides/get-engagement-analytics-via-api"},{"title":"Engagement via Grafana","href":"/v1/developers/guides/get-engagement-analytics-via-grafana"},{"title":"Engagement via Timeplus","href":"/v1/developers/guides/get-engagement-analytics-via-timeplus"}]},{"group":"Projects","icon":"folder-open","pages":[{"title":"Managing Projects","href":"/v1/developers/guides/managing-projects"}]},{"group":"Integrations","icon":"puzzle-piece","pages":[{"title":"Youtube clone with FVM","href":"/v1/developers/tutorials/decentralized-app-with-fvm"},{"title":"Token gate videos with Lit","href":"/v1/developers/tutorials/token-gate-videos-with-lit"},{"group":"Storage Provider Integration","pages":[{"title":"Play from 4everland","href":"/v1/developers/tutorials/upload-playback-videos-4everland"},{"title":"Play from Arweave","description":"Learn how to upload and stream videos from Arweave using Bundlr and Livepeer","href":"/v1/developers/tutorials/upload-playback-videos-on-arweave"},{"title":"Play from IPFS","href":"/v1/developers/tutorials/upload-playback-videos-on-ipfs"}]}]}]},{"group":"References","pages":[{"title":"API Support Matrix","icon":"list-check","description":null,"href":"/v1/references/api-support-matrix"},{"group":"Livepeer Node Software","icon":"golang","pages":[{"title":"Bandwidth Requirements","href":"/v1/references/go-livepeer/bandwidth-requirements"},{"title":"CLI Reference","href":"/v1/references/go-livepeer/cli-reference"},{"title":"GPU Support","href":"/v1/references/go-livepeer/gpu-support"},{"title":"Hardware Requirements","href":"/v1/references/go-livepeer/hardware-requirements"},{"title":"Prometheus Metrics","href":"/v1/references/go-livepeer/prometheus-metrics"}]},{"title":"Contract Addresses","sidebarTitle":"Contract Addresses","href":"/v1/references/contract-addresses"},{"title":"Example Applications","icon":"grid-round-2-plus","href":"/v1/references/example-applications"},{"title":"Awesome Livepeer","url":"https://github.com/livepeer/awesome-livepeer","icon":"stars","href":"/v1/references/awesome-livepeer"},{"group":"FAQs","icon":"book","pages":[{"title":null,"href":"/v1/references/knowledge-base/livestream"},{"title":null,"href":"/v1/references/knowledge-base/playback"},{"title":null,"href":"/v1/references/knowledge-base/vod"}]}]}]},{"anchor":"API Reference","icon":"rectangle-terminal","pages":[{"title":"API Reference","href":"/v1/api-reference/overview/introduction"}]},{"anchor":"SDKs","icon":"brackets-curly","pages":[{"title":"SDKs","href":"/v1/sdks/introduction"}]},{"anchor":"AI Video (Beta)","icon":{"style":"regular","name":"microchip-ai"},"pages":[{"title":"AI Video (Beta)","href":"/v1/ai/introduction"}]},{"anchor":" ","icon":"horizontal-rule"},{"anchor":"Livepeer Studio ➚","icon":"clapperboard-play","href":"https://livepeer.studio"},{"anchor":"What's New ➚","icon":"rocket","href":"https://livepeer.canny.io/changelog"},{"anchor":"Community ➚","icon":{"style":"brands","name":"discord"},"href":"https://discord.gg/livepeer"}]},{"dropdown":"Delegators","icon":"coins","anchors":[{"anchor":"Documentation","icon":"code","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","icon":"hand-wave","href":"/v1/delegators/introduction"},{"title":"Quickstart","icon":"bolt","href":"/v1/delegators/quick-start"},{"title":"CLI","icon":"rectangle-terminal","href":"/v1/delegators/livepeer-studio-cli"}]},{"group":"Guides","pages":[{"title":"Bridge LPT to Arbitrum","icon":"bridge","href":"/v1/delegators/guides/bridge-lpt-to-arbitrum"},{"title":"Migrate stake to Arbitrum","icon":"right-from-bracket","href":"/v1/delegators/guides/migrate-stake-to-arbitrum"},{"title":"Yield Calculation on Explorer","icon":"calculator","href":"/v1/delegators/guides/yield-calculation"}]},{"group":"References","pages":[{"title":"API Support Matrix","icon":"list-check","href":"/v1/references/api-support-matrix"},{"group":"Livepeer Node Software","icon":"golang","pages":[{"title":"Bandwidth Requirements","href":"/v1/references/go-livepeer/bandwidth-requirements"},{"title":"CLI Reference","href":"/v1/references/go-livepeer/cli-reference"},{"title":"GPU Support","href":"/v1/references/go-livepeer/gpu-support"},{"title":"Hardware Requirements","href":"/v1/references/go-livepeer/hardware-requirements"},{"title":"Prometheus Metrics","href":"/v1/references/go-livepeer/prometheus-metrics"}]},{"title":"Contract Addresses","sidebarTitle":"Contract Addresses","href":"/v1/references/contract-addresses"},{"title":"Example Applications","icon":"grid-round-2-plus","href":"/v1/references/example-applications"},{"title":"Awesome Livepeer","url":"https://github.com/livepeer/awesome-livepeer","icon":"stars","href":"/v1/references/awesome-livepeer"},{"group":"FAQs","icon":"book","pages":[{"title":null,"href":"/v1/references/knowledge-base/livestream"},{"title":null,"href":"/v1/references/knowledge-base/playback"},{"title":null,"href":"/v1/references/knowledge-base/vod"}]}]}]},{"anchor":"API Reference","icon":"rectangle-terminal","groups":[{"group":"Overview","pages":[{"title":"Introduction","icon":"hand-wave","href":"/v1/api-reference/overview/introduction"},{"title":"Authentication","icon":"lock","href":"/v1/api-reference/overview/authentication"}]},{"group":"APIs","pages":[{"group":"Asset","icon":"video","pages":[{"title":null,"href":"/v1/api-reference/asset/overview"},{"title":"Upload an asset","openapi":"POST /asset/request-upload","href":"/v1/api-reference/asset/upload"},{"title":"Upload asset via URL","openapi":"POST /asset/upload/url","href":"/v1/api-reference/asset/upload-via-url"},{"title":"Retrieve an asset","openapi":"GET /asset/{assetId}","href":"/v1/api-reference/asset/get"},{"title":"Update an asset","openapi":"PATCH /asset/{assetId}","href":"/v1/api-reference/asset/update"},{"title":"Delete an asset","openapi":"DELETE /asset/{assetId}","href":"/v1/api-reference/asset/delete"},{"title":"Retrieve assets","openapi":"GET /asset","href":"/v1/api-reference/asset/get-all"}]},{"group":"Livestream","icon":"camera","pages":[{"title":null,"href":"/v1/api-reference/stream/overview"},{"title":"Create a livestream","openapi":"POST /stream","href":"/v1/api-reference/stream/create"},{"title":"Retrieve a livestream","openapi":"GET /stream/{id}","href":"/v1/api-reference/stream/get"},{"title":"Update a livestream","openapi":"PATCH /stream/{id}","href":"/v1/api-reference/stream/update"},{"title":"Terminates a livestream","openapi":"DELETE /stream/{id}/terminate","href":"/v1/api-reference/stream/terminate"},{"title":"Add a multistream target","openapi":"POST /stream/{id}/create-multistream-target","href":"/v1/api-reference/stream/add-multistream-target"},{"title":"Remove a multistream target","openapi":"DELETE /stream/{id}/multistream/{targetId}","href":"/v1/api-reference/stream/delete-multistream-target"},{"title":"Delete a livestream","openapi":"DELETE /stream/{id}","href":"/v1/api-reference/stream/delete"},{"title":"Retrieve all livestreams","openapi":"GET /stream","href":"/v1/api-reference/stream/get-all"},{"title":"Create a clip","openapi":"POST /clip","href":"/v1/api-reference/stream/create-clip"},{"title":"Retrieve clips of a livestream","openapi":"GET /stream/{id}/clips","href":"/v1/api-reference/stream/get-clip"}]},{"group":"Generate","icon":"microchip-ai","pages":[{"title":null,"href":"/v1/api-reference/generate/overview"},{"title":"Audio To Text","openapi":"POST /api/beta/generate/audio-to-text","href":"/v1/api-reference/generate/audio-to-text"},{"title":"Text To Image","openapi":"POST /api/beta/generate/text-to-image","href":"/v1/api-reference/generate/text-to-image"},{"title":"Image To Image","openapi":"POST /api/beta/generate/image-to-image","href":"/v1/api-reference/generate/image-to-image"},{"title":"Image To Video","openapi":"POST /api/beta/generate/image-to-video","href":"/v1/api-reference/generate/image-to-video"},{"title":"LLM","href":"/v1/api-reference/generate/llm"},{"title":"Segment Anything 2","openapi":"POST /api/beta/generate/segment-anything-2","href":"/v1/api-reference/generate/segment-anything-2"},{"title":"Upscale","openapi":"POST /api/beta/generate/upscale","href":"/v1/api-reference/generate/upscale"}]},{"group":"Multistream target","icon":"arrows-split-up-and-left","pages":[{"title":null,"href":"/v1/api-reference/multistream/overview"},{"title":"Create a multistream","openapi":"POST /multistream/target","href":"/v1/api-reference/multistream/create"},{"title":"Retrieve a multistream","openapi":"GET /multistream/target/{id}","href":"/v1/api-reference/multistream/get"},{"title":"Update a multistream","openapi":"PATCH /multistream/target/{id}","href":"/v1/api-reference/multistream/update"},{"title":"Delete a multistream","openapi":"DELETE /multistream/target/{id}","href":"/v1/api-reference/multistream/delete"},{"title":"Retrieve all multistreams","openapi":"GET /multistream/target","href":"/v1/api-reference/multistream/get-all"}]},{"group":"Session","icon":"film","pages":[{"title":null,"href":"/v1/api-reference/session/overview"},{"title":"Retrieve a session","openapi":"GET /session/{id}","href":"/v1/api-reference/session/get"},{"title":"Retrieve all sessions","openapi":"GET /session","href":"/v1/api-reference/session/get-all"},{"title":"Retrieve recorded sessions","openapi":"GET /stream/{parentId}/sessions","href":"/v1/api-reference/session/get-recording"},{"title":"Retrieve clips of a session","openapi":"GET /session/{id}/clips","href":"/v1/api-reference/session/get-clip"}]},{"group":"Access control","icon":"lock","pages":[{"title":null,"href":"/v1/api-reference/signing-key/overview"},{"title":"Create a signing key","openapi":"POST /access-control/signing-key","href":"/v1/api-reference/signing-key/create"},{"title":"Retrieve a signing key","openapi":"GET /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/get"},{"title":"Update a signing key","openapi":"PATCH /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/update"},{"title":"Delete a signing key","openapi":"DELETE /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/delete"},{"title":"Retrieve signing keys","openapi":"GET /access-control/signing-key","href":"/v1/api-reference/signing-key/get-all"}]},{"group":"Webhook","icon":"bell","pages":[{"title":null,"href":"/v1/api-reference/webhook/overview"},{"title":"Create a webhook","openapi":"POST /webhook","href":"/v1/api-reference/webhook/create"},{"title":"Retrieve a webhook","openapi":"GET /webhook/{id}","href":"/v1/api-reference/webhook/get"},{"title":"Update a webhook","openapi":"PUT /webhook/{id}","href":"/v1/api-reference/webhook/update"},{"title":"Delete a webhook","openapi":"DELETE /webhook/{id}","href":"/v1/api-reference/webhook/delete"},{"title":"Retrieve all webhooks","openapi":"GET /webhook","href":"/v1/api-reference/webhook/get-all"}]},{"group":"Task","icon":"gear","pages":[{"title":null,"href":"/v1/api-reference/task/overview"},{"title":"Retrieve tasks","openapi":"GET /task","href":"/v1/api-reference/task/get-all"},{"title":"Retrieve a task","openapi":"GET /task/{taskId}","href":"/v1/api-reference/task/get"}]},{"group":"Playback","icon":"play","pages":[{"title":null,"href":"/v1/api-reference/playback/overview"},{"title":"Retrieve Playback Info","openapi":"GET /playback/{id}","href":"/v1/api-reference/playback/get"}]},{"group":"Transcode","icon":"photo-film","pages":[{"title":null,"href":"/v1/api-reference/transcode/overview"},{"title":"Transcode a video","openapi":"POST /transcode","href":"/v1/api-reference/transcode/create"}]},{"group":"Viewership","icon":"chart-bar","pages":[{"title":"Query realtime viewership","openapi":"GET /data/views/now","href":"/v1/api-reference/viewership/get-realtime-viewership"},{"title":"Query viewership metrics","openapi":"GET /data/views/query","href":"/v1/api-reference/viewership/get-viewership-metrics"},{"title":"Query usage metrics","openapi":"GET /data/usage/query","href":"/v1/api-reference/viewership/get-usage-metrics"},{"title":"Query public total views metrics","openapi":"GET /data/views/query/total/{playbackId}","href":"/v1/api-reference/viewership/get-public-total-views"},{"title":"Query creator viewership metrics","openapi":"GET /data/views/query/creator","href":"/v1/api-reference/viewership/get-creators-metrics"}]}]}]},{"anchor":"SDKs","icon":"brackets-curly","groups":[{"group":"Overview","pages":[{"title":"SDKs","sidebarTitle":"Introduction","href":"/v1/sdks/introduction"}]},{"group":"Server-side SDKs","pages":[{"title":"JavaScript","icon":"js","href":"/v1/sdks/javascript"},{"title":"Go","icon":"golang","href":"/v1/sdks/go"},{"title":"Python","icon":"python","href":"/v1/sdks/python"}]},{"group":"React Components","icon":"circle-play","pages":[{"title":"Getting Started","href":"/v1/sdks/react/getting-started"},{"group":"Player","icon":"circle-play","pages":[{"title":"Root","icon":"flag-checkered","href":"/v1/sdks/react/player/Root"},{"title":"Container","icon":"tv","href":"/v1/sdks/react/player/Container"},{"title":"Video","icon":"video","href":"/v1/sdks/react/player/Video"},{"title":"Error","icon":"triangle-exclamation","href":"/v1/sdks/react/player/Error"},{"title":"Loading","icon":"spinner","href":"/v1/sdks/react/player/Loading"},{"title":"Portal","icon":"person-to-portal","href":"/v1/sdks/react/player/Portal"},{"title":"Poster","icon":"image","href":"/v1/sdks/react/player/Poster"},{"group":"Controls","pages":[{"title":"Controls","icon":"gamepad","href":"/v1/sdks/react/player/Controls"},{"title":"Clip","icon":"scissors","href":"/v1/sdks/react/player/Clip"},{"title":"Fullscreen","icon":"expand","href":"/v1/sdks/react/player/Fullscreen"},{"title":"Live","icon":"headset","href":"/v1/sdks/react/player/Live"},{"title":"Picture in Picture","icon":"clone","href":"/v1/sdks/react/player/PictureInPicture"},{"title":"Play","icon":"play","href":"/v1/sdks/react/player/Play"},{"title":"Playback Speed","icon":"gauge-simple-high","href":"/v1/sdks/react/player/RateSelect"},{"title":"Seek","icon":"forward","href":"/v1/sdks/react/player/Seek"},{"title":"Time","icon":"clock","href":"/v1/sdks/react/player/Time"},{"title":"Video Quality","icon":"signal","href":"/v1/sdks/react/player/VideoQualitySelect"},{"title":"Volume","icon":"volume-high","href":"/v1/sdks/react/player/Volume"}]},{"group":"Functions","pages":[{"title":"getSrc","icon":"link","href":"/v1/sdks/react/player/get-src"},{"title":"useMediaContext","icon":"database","href":"/v1/sdks/react/player/useMediaContext"}]}]},{"group":"Broadcast","icon":"signal-stream","pages":[{"title":"Root","icon":"flag-checkered","href":"/v1/sdks/react/broadcast/Root"},{"title":"Container","icon":"tv","href":"/v1/sdks/react/broadcast/Container"},{"title":"Video","icon":"video","href":"/v1/sdks/react/broadcast/Video"},{"title":"Enable","icon":"clapperboard","href":"/v1/sdks/react/broadcast/Enabled"},{"title":"Error","icon":"triangle-exclamation","href":"/v1/sdks/react/broadcast/Error"},{"title":"Loading","icon":"spinner","href":"/v1/sdks/react/broadcast/Loading"},{"title":"Portal","icon":"person-to-portal","href":"/v1/sdks/react/broadcast/Portal"},{"group":"Controls","pages":[{"title":"Controls","icon":"gamepad","href":"/v1/sdks/react/broadcast/Controls"},{"title":"Audio","icon":"microphone-stand","href":"/v1/sdks/react/broadcast/Audio"},{"title":"Camera","icon":"camcorder","href":"/v1/sdks/react/broadcast/Camera"},{"title":"Fullscreen","icon":"expand","href":"/v1/sdks/react/broadcast/Fullscreen"},{"title":"Picture in Picture","icon":"clone","href":"/v1/sdks/react/broadcast/PictureInPicture"},{"title":"Screenshare","icon":"screencast","href":"/v1/sdks/react/broadcast/Screenshare"},{"title":"Source","icon":"sliders","href":"/v1/sdks/react/broadcast/Source"},{"title":"Status","icon":"wave-pulse","href":"/v1/sdks/react/broadcast/Status"}]},{"group":"Functions","pages":[{"title":"getIngest","icon":"link","href":"/v1/sdks/react/broadcast/get-ingest"},{"title":"useBroadcastContext","icon":"database","href":"/v1/sdks/react/broadcast/useBroadcastContext"}]}]},{"group":"Examples","icon":"clipboard","pages":[{"title":"Player","href":"/v1/sdks/react/Player"},{"title":"Broadcast","href":"/v1/sdks/react/Broadcast"}]},{"group":"Migration","icon":"right-left","pages":[{"title":"Migration Guide for 4+","href":"/v1/sdks/react/migration/migration-4.x"},{"group":"Livepeer React (3.x and below)","pages":[{"title":"Getting Started","href":"/v1/sdks/react/migration/3.x/getting-started"},{"title":"Client","href":"/v1/sdks/react/migration/3.x/client"},{"title":"LivepeerConfig","href":"/v1/sdks/react/migration/3.x/LivepeerConfig"},{"title":"Player","href":"/v1/sdks/react/migration/3.x/Player"},{"title":"Broadcast","href":"/v1/sdks/react/migration/3.x/Broadcast"},{"group":"Asset","pages":[{"title":"useCreateAsset","href":"/v1/sdks/react/migration/3.x/asset/useCreateAsset"},{"title":"useAsset","href":"/v1/sdks/react/migration/3.x/asset/useAsset"},{"title":"useUpdateAsset","href":"/v1/sdks/react/migration/3.x/asset/useUpdateAsset"},{"title":"useAssetMetrics","href":"/v1/sdks/react/migration/3.x/asset/useAssetMetrics"}]},{"group":"Stream","pages":[{"title":"useCreateStream","href":"/v1/sdks/react/migration/3.x/stream/useCreateStream"},{"title":"useStream","href":"/v1/sdks/react/migration/3.x/stream/useStream"},{"title":"useUpdateStream","href":"/v1/sdks/react/migration/3.x/stream/useUpdateStream"},{"title":"useStreamSession","href":"/v1/sdks/react/migration/3.x/stream/useStreamSession"},{"title":"useStreamSessions","href":"/v1/sdks/react/migration/3.x/stream/useStreamSessions"}]},{"group":"Playback","pages":[{"title":"usePlaybackInfo","href":"/v1/sdks/react/migration/3.x/playback/usePlaybackInfo"}]},{"group":"Constants","pages":[{"title":"Application Binary Interface","href":"/v1/sdks/react/migration/3.x/constants/abis"},{"title":"Contract Addresses","href":"/v1/sdks/react/migration/3.x/constants/contract-addresses"}]}]}]}]}]},{"anchor":"AI Video (Beta)","icon":{"style":"regular","name":"microchip-ai"},"groups":[{"group":"AI Video","pages":[{"title":"What is Livepeer AI?","icon":"microchip-ai","iconType":"regular","href":"/v1/ai/introduction"},{"title":"What's New","icon":"rocket","url":"https://livepeer-ai.productlane.com/changelog","href":"/v1/ai/whats-new"},{"group":"AI Pipelines","icon":{"style":"solid","name":"wand-magic-sparkles"},"pages":[{"title":"Overview","href":"/v1/ai/pipelines/overview"},{"title":"Audio-to-Text","href":"/v1/ai/pipelines/audio-to-text"},{"title":"Image-to-Image","href":"/v1/ai/pipelines/image-to-image"},{"title":"Image-to-Text","href":"/v1/ai/pipelines/image-to-text"},{"title":"Image-to-Video","href":"/v1/ai/pipelines/image-to-video"},{"title":"LLM","href":"/v1/ai/pipelines/llm"},{"title":"Segment-Anything-2","href":"/v1/ai/pipelines/segment-anything-2"},{"title":"Text-to-Image","href":"/v1/ai/pipelines/text-to-image"},{"title":"Text-to-Speech","href":"/v1/ai/pipelines/text-to-speech"},{"title":"Upscale","href":"/v1/ai/pipelines/upscale"}]},{"group":"Setup an AI Orchestrator","icon":{"style":"solid","name":"robot"},"pages":[{"title":"Get Started","href":"/v1/ai/orchestrators/get-started"},{"title":"Configuring AI Models","href":"/v1/ai/orchestrators/models-config"},{"title":"Download AI Models","href":"/v1/ai/orchestrators/models-download"},{"title":"Start your AI Orchestrator","href":"/v1/ai/orchestrators/start-orchestrator"},{"title":"Attach Remote AI Workers","href":"/v1/ai/orchestrators/ai-worker"},{"title":"Perform Benchmarking","href":"/v1/ai/orchestrators/benchmarking"},{"title":"On-chain Setup","href":"/v1/ai/orchestrators/onchain"}]},{"group":"Setup an AI Gateway","icon":{"style":"solid","name":"signal-stream"},"pages":[{"title":"Get Started","href":"/v1/ai/gateways/get-started"},{"title":null,"href":"/v1/ai/gateways/start-gateway"},{"title":null,"href":"/v1/ai/gateways/onchain"}]},{"group":"AI Builders","icon":{"style":"solid","name":"screwdriver-wrench"},"pages":[{"title":"Building on Livepeer AI","href":"/v1/ai/builders/get-started"},{"title":"AI Gateways","href":"/v1/ai/builders/gateways"},{"title":"Showcase","href":"/v1/ai/builders/showcase"}]},{"group":"How to Contribute","icon":{"style":"solid","name":"heart"},"pages":[{"title":"Get Started","href":"/v1/ai/contributors/coming-soon"}]},{"group":"SDKs","icon":"brackets-curly","pages":[{"title":"AI SDKs","sidebarTitle":"Overview","href":"/v1/ai/sdks/overview"},{"title":"Go","icon":"golang","href":"/v1/ai/sdks/go"},{"title":"JavaScript","icon":"js","href":"/v1/ai/sdks/javascript"},{"title":"Python","icon":"python","href":"/v1/ai/sdks/python"}]},{"group":"AI API Reference","icon":"rectangle-terminal","pages":[{"title":"Introduction","href":"/v1/ai/api-reference/overview"},{"openapi":"post /audio-to-text","title":"Audio To Text","href":"/v1/ai/api-reference/audio-to-text"},{"openapi":"post /image-to-image","title":"Image To Image","href":"/v1/ai/api-reference/image-to-image"},{"openapi":"post /image-to-text","title":"Image To Text","href":"/v1/ai/api-reference/image-to-text"},{"openapi":"post /image-to-video","title":"Image To Video","href":"/v1/ai/api-reference/image-to-video"},{"openapi":"post /llm","title":"LLM","href":"/v1/ai/api-reference/llm"},{"openapi":"post /segment-anything-2","title":"Segment Anything 2","href":"/v1/ai/api-reference/segment-anything-2"},{"openapi":"post /text-to-image","title":"Text To Image","href":"/v1/ai/api-reference/text-to-image"},{"openapi":"post /text-to-speech","title":"Text To Speech","href":"/v1/ai/api-reference/text-to-speech"},{"openapi":"post /upscale","title":"Upscale","href":"/v1/ai/api-reference/upscale"}]}]}]},{"anchor":" ","icon":"horizontal-rule"},{"anchor":"Livepeer Studio ➚","icon":"clapperboard-play","href":"https://livepeer.studio"},{"anchor":"What's New ➚","icon":"rocket","href":"https://livepeer.canny.io/changelog"},{"anchor":"Community ➚","icon":{"style":"brands","name":"discord"},"href":"https://discord.gg/livepeer"}]},{"dropdown":"Orchestrators","icon":"microchip","anchors":[{"anchor":"Documentation","icon":"code","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","icon":"hand-wave","href":"/v1/orchestrators/introduction"},{"title":"Quickstart","icon":"bolt","href":"/v1/orchestrators/quick-start"},{"title":"CLI","icon":"rectangle-terminal","href":"/v1/orchestrators/livepeer-studio-cli"}]},{"group":"Guides","pages":[{"title":"Get started","icon":"rocket","href":"/v1/orchestrators/guides/get-started"},{"title":"Install Go Livepeer","icon":"download","href":"/v1/orchestrators/guides/install-go-livepeer"},{"title":"Connect to Arbitrum","icon":"plug","href":"/v1/orchestrators/guides/connect-to-arbitrum"},{"title":"Reward Calls","icon":"coins","href":"/v1/orchestrators/guides/configure-reward-calling"},{"title":"Set Session Limits","icon":"wand-magic-sparkles","href":"/v1/orchestrators/guides/set-session-limits"},{"title":"Set Pricing","icon":"tag","href":"/v1/orchestrators/guides/set-pricing"},{"title":"Benchmark Transcoding","icon":"server","href":"/v1/orchestrators/guides/benchmark-transcoding"},{"title":"Assess concurrent stream","icon":"signal-stream","href":"/v1/orchestrators/guides/assess-capabilities"},{"title":"Monitor Metrics","icon":"monitor-waveform","href":"/v1/orchestrators/guides/monitor-metrics"},{"title":"Vote on proposals","icon":"check-to-slot","href":"/v1/orchestrators/guides/vote"},{"title":"Dual Mine","icon":"pickaxe","href":"/v1/orchestrators/guides/dual-mine"},{"title":"Connect to Transcoders","icon":"plug","href":"/v1/orchestrators/guides/o-t-split"},{"title":"Migrate to Arbitrum","icon":"right-from-bracket","href":"/v1/orchestrators/guides/migrate-to-arbitrum"},{"title":"Migrate Stake from Contract","icon":"route-interstate","href":"/v1/orchestrators/guides/migrate-from-contract-wallet"},{"title":"Gateway Introspection","icon":"tower-broadcast","href":"/v1/orchestrators/guides/gateway-introspection"},{"title":"Troubleshoot","icon":"triangle-exclamation","href":"/v1/orchestrators/guides/troubleshoot"}]},{"group":"References","pages":[{"title":"API Support Matrix","icon":"list-check","href":"/v1/references/api-support-matrix"},{"group":"Livepeer Node Software","icon":"golang","pages":[{"title":"Bandwidth Requirements","href":"/v1/references/go-livepeer/bandwidth-requirements"},{"title":"CLI Reference","href":"/v1/references/go-livepeer/cli-reference"},{"title":"GPU Support","href":"/v1/references/go-livepeer/gpu-support"},{"title":"Hardware Requirements","href":"/v1/references/go-livepeer/hardware-requirements"},{"title":"Prometheus Metrics","href":"/v1/references/go-livepeer/prometheus-metrics"}]},{"title":"Contract Addresses","sidebarTitle":"Contract Addresses","href":"/v1/references/contract-addresses"},{"title":"Example Applications","icon":"grid-round-2-plus","href":"/v1/references/example-applications"},{"title":"Awesome Livepeer","url":"https://github.com/livepeer/awesome-livepeer","icon":"stars","href":"/v1/references/awesome-livepeer"},{"group":"FAQs","icon":"book","pages":[{"title":null,"href":"/v1/references/knowledge-base/livestream"},{"title":null,"href":"/v1/references/knowledge-base/playback"},{"title":null,"href":"/v1/references/knowledge-base/vod"}]}]}]},{"anchor":"API Reference","icon":"rectangle-terminal","groups":[{"group":"Overview","pages":[{"title":"Introduction","icon":"hand-wave","href":"/v1/api-reference/overview/introduction"},{"title":"Authentication","icon":"lock","href":"/v1/api-reference/overview/authentication"}]},{"group":"APIs","pages":[{"group":"Asset","icon":"video","pages":[{"title":null,"href":"/v1/api-reference/asset/overview"},{"title":"Upload an asset","openapi":"POST /asset/request-upload","href":"/v1/api-reference/asset/upload"},{"title":"Upload asset via URL","openapi":"POST /asset/upload/url","href":"/v1/api-reference/asset/upload-via-url"},{"title":"Retrieve an asset","openapi":"GET /asset/{assetId}","href":"/v1/api-reference/asset/get"},{"title":"Update an asset","openapi":"PATCH /asset/{assetId}","href":"/v1/api-reference/asset/update"},{"title":"Delete an asset","openapi":"DELETE /asset/{assetId}","href":"/v1/api-reference/asset/delete"},{"title":"Retrieve assets","openapi":"GET /asset","href":"/v1/api-reference/asset/get-all"}]},{"group":"Livestream","icon":"camera","pages":[{"title":null,"href":"/v1/api-reference/stream/overview"},{"title":"Create a livestream","openapi":"POST /stream","href":"/v1/api-reference/stream/create"},{"title":"Retrieve a livestream","openapi":"GET /stream/{id}","href":"/v1/api-reference/stream/get"},{"title":"Update a livestream","openapi":"PATCH /stream/{id}","href":"/v1/api-reference/stream/update"},{"title":"Terminates a livestream","openapi":"DELETE /stream/{id}/terminate","href":"/v1/api-reference/stream/terminate"},{"title":"Add a multistream target","openapi":"POST /stream/{id}/create-multistream-target","href":"/v1/api-reference/stream/add-multistream-target"},{"title":"Remove a multistream target","openapi":"DELETE /stream/{id}/multistream/{targetId}","href":"/v1/api-reference/stream/delete-multistream-target"},{"title":"Delete a livestream","openapi":"DELETE /stream/{id}","href":"/v1/api-reference/stream/delete"},{"title":"Retrieve all livestreams","openapi":"GET /stream","href":"/v1/api-reference/stream/get-all"},{"title":"Create a clip","openapi":"POST /clip","href":"/v1/api-reference/stream/create-clip"},{"title":"Retrieve clips of a livestream","openapi":"GET /stream/{id}/clips","href":"/v1/api-reference/stream/get-clip"}]},{"group":"Generate","icon":"microchip-ai","pages":[{"title":null,"href":"/v1/api-reference/generate/overview"},{"title":"Audio To Text","openapi":"POST /api/beta/generate/audio-to-text","href":"/v1/api-reference/generate/audio-to-text"},{"title":"Text To Image","openapi":"POST /api/beta/generate/text-to-image","href":"/v1/api-reference/generate/text-to-image"},{"title":"Image To Image","openapi":"POST /api/beta/generate/image-to-image","href":"/v1/api-reference/generate/image-to-image"},{"title":"Image To Video","openapi":"POST /api/beta/generate/image-to-video","href":"/v1/api-reference/generate/image-to-video"},{"title":"LLM","href":"/v1/api-reference/generate/llm"},{"title":"Segment Anything 2","openapi":"POST /api/beta/generate/segment-anything-2","href":"/v1/api-reference/generate/segment-anything-2"},{"title":"Upscale","openapi":"POST /api/beta/generate/upscale","href":"/v1/api-reference/generate/upscale"}]},{"group":"Multistream target","icon":"arrows-split-up-and-left","pages":[{"title":null,"href":"/v1/api-reference/multistream/overview"},{"title":"Create a multistream","openapi":"POST /multistream/target","href":"/v1/api-reference/multistream/create"},{"title":"Retrieve a multistream","openapi":"GET /multistream/target/{id}","href":"/v1/api-reference/multistream/get"},{"title":"Update a multistream","openapi":"PATCH /multistream/target/{id}","href":"/v1/api-reference/multistream/update"},{"title":"Delete a multistream","openapi":"DELETE /multistream/target/{id}","href":"/v1/api-reference/multistream/delete"},{"title":"Retrieve all multistreams","openapi":"GET /multistream/target","href":"/v1/api-reference/multistream/get-all"}]},{"group":"Session","icon":"film","pages":[{"title":null,"href":"/v1/api-reference/session/overview"},{"title":"Retrieve a session","openapi":"GET /session/{id}","href":"/v1/api-reference/session/get"},{"title":"Retrieve all sessions","openapi":"GET /session","href":"/v1/api-reference/session/get-all"},{"title":"Retrieve recorded sessions","openapi":"GET /stream/{parentId}/sessions","href":"/v1/api-reference/session/get-recording"},{"title":"Retrieve clips of a session","openapi":"GET /session/{id}/clips","href":"/v1/api-reference/session/get-clip"}]},{"group":"Access control","icon":"lock","pages":[{"title":null,"href":"/v1/api-reference/signing-key/overview"},{"title":"Create a signing key","openapi":"POST /access-control/signing-key","href":"/v1/api-reference/signing-key/create"},{"title":"Retrieve a signing key","openapi":"GET /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/get"},{"title":"Update a signing key","openapi":"PATCH /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/update"},{"title":"Delete a signing key","openapi":"DELETE /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/delete"},{"title":"Retrieve signing keys","openapi":"GET /access-control/signing-key","href":"/v1/api-reference/signing-key/get-all"}]},{"group":"Webhook","icon":"bell","pages":[{"title":null,"href":"/v1/api-reference/webhook/overview"},{"title":"Create a webhook","openapi":"POST /webhook","href":"/v1/api-reference/webhook/create"},{"title":"Retrieve a webhook","openapi":"GET /webhook/{id}","href":"/v1/api-reference/webhook/get"},{"title":"Update a webhook","openapi":"PUT /webhook/{id}","href":"/v1/api-reference/webhook/update"},{"title":"Delete a webhook","openapi":"DELETE /webhook/{id}","href":"/v1/api-reference/webhook/delete"},{"title":"Retrieve all webhooks","openapi":"GET /webhook","href":"/v1/api-reference/webhook/get-all"}]},{"group":"Task","icon":"gear","pages":[{"title":null,"href":"/v1/api-reference/task/overview"},{"title":"Retrieve tasks","openapi":"GET /task","href":"/v1/api-reference/task/get-all"},{"title":"Retrieve a task","openapi":"GET /task/{taskId}","href":"/v1/api-reference/task/get"}]},{"group":"Playback","icon":"play","pages":[{"title":null,"href":"/v1/api-reference/playback/overview"},{"title":"Retrieve Playback Info","openapi":"GET /playback/{id}","href":"/v1/api-reference/playback/get"}]},{"group":"Transcode","icon":"photo-film","pages":[{"title":null,"href":"/v1/api-reference/transcode/overview"},{"title":"Transcode a video","openapi":"POST /transcode","href":"/v1/api-reference/transcode/create"}]},{"group":"Viewership","icon":"chart-bar","pages":[{"title":"Query realtime viewership","openapi":"GET /data/views/now","href":"/v1/api-reference/viewership/get-realtime-viewership"},{"title":"Query viewership metrics","openapi":"GET /data/views/query","href":"/v1/api-reference/viewership/get-viewership-metrics"},{"title":"Query usage metrics","openapi":"GET /data/usage/query","href":"/v1/api-reference/viewership/get-usage-metrics"},{"title":"Query public total views metrics","openapi":"GET /data/views/query/total/{playbackId}","href":"/v1/api-reference/viewership/get-public-total-views"},{"title":"Query creator viewership metrics","openapi":"GET /data/views/query/creator","href":"/v1/api-reference/viewership/get-creators-metrics"}]}]}]},{"anchor":"SDKs","icon":"brackets-curly","groups":[{"group":"Overview","pages":[{"title":"SDKs","sidebarTitle":"Introduction","href":"/v1/sdks/introduction"}]},{"group":"Server-side SDKs","pages":[{"title":"JavaScript","icon":"js","href":"/v1/sdks/javascript"},{"title":"Go","icon":"golang","href":"/v1/sdks/go"},{"title":"Python","icon":"python","href":"/v1/sdks/python"}]},{"group":"React Components","icon":"circle-play","pages":[{"title":"Getting Started","href":"/v1/sdks/react/getting-started"},{"group":"Player","icon":"circle-play","pages":[{"title":"Root","icon":"flag-checkered","href":"/v1/sdks/react/player/Root"},{"title":"Container","icon":"tv","href":"/v1/sdks/react/player/Container"},{"title":"Video","icon":"video","href":"/v1/sdks/react/player/Video"},{"title":"Error","icon":"triangle-exclamation","href":"/v1/sdks/react/player/Error"},{"title":"Loading","icon":"spinner","href":"/v1/sdks/react/player/Loading"},{"title":"Portal","icon":"person-to-portal","href":"/v1/sdks/react/player/Portal"},{"title":"Poster","icon":"image","href":"/v1/sdks/react/player/Poster"},{"group":"Controls","pages":[{"title":"Controls","icon":"gamepad","href":"/v1/sdks/react/player/Controls"},{"title":"Clip","icon":"scissors","href":"/v1/sdks/react/player/Clip"},{"title":"Fullscreen","icon":"expand","href":"/v1/sdks/react/player/Fullscreen"},{"title":"Live","icon":"headset","href":"/v1/sdks/react/player/Live"},{"title":"Picture in Picture","icon":"clone","href":"/v1/sdks/react/player/PictureInPicture"},{"title":"Play","icon":"play","href":"/v1/sdks/react/player/Play"},{"title":"Playback Speed","icon":"gauge-simple-high","href":"/v1/sdks/react/player/RateSelect"},{"title":"Seek","icon":"forward","href":"/v1/sdks/react/player/Seek"},{"title":"Time","icon":"clock","href":"/v1/sdks/react/player/Time"},{"title":"Video Quality","icon":"signal","href":"/v1/sdks/react/player/VideoQualitySelect"},{"title":"Volume","icon":"volume-high","href":"/v1/sdks/react/player/Volume"}]},{"group":"Functions","pages":[{"title":"getSrc","icon":"link","href":"/v1/sdks/react/player/get-src"},{"title":"useMediaContext","icon":"database","href":"/v1/sdks/react/player/useMediaContext"}]}]},{"group":"Broadcast","icon":"signal-stream","pages":[{"title":"Root","icon":"flag-checkered","href":"/v1/sdks/react/broadcast/Root"},{"title":"Container","icon":"tv","href":"/v1/sdks/react/broadcast/Container"},{"title":"Video","icon":"video","href":"/v1/sdks/react/broadcast/Video"},{"title":"Enable","icon":"clapperboard","href":"/v1/sdks/react/broadcast/Enabled"},{"title":"Error","icon":"triangle-exclamation","href":"/v1/sdks/react/broadcast/Error"},{"title":"Loading","icon":"spinner","href":"/v1/sdks/react/broadcast/Loading"},{"title":"Portal","icon":"person-to-portal","href":"/v1/sdks/react/broadcast/Portal"},{"group":"Controls","pages":[{"title":"Controls","icon":"gamepad","href":"/v1/sdks/react/broadcast/Controls"},{"title":"Audio","icon":"microphone-stand","href":"/v1/sdks/react/broadcast/Audio"},{"title":"Camera","icon":"camcorder","href":"/v1/sdks/react/broadcast/Camera"},{"title":"Fullscreen","icon":"expand","href":"/v1/sdks/react/broadcast/Fullscreen"},{"title":"Picture in Picture","icon":"clone","href":"/v1/sdks/react/broadcast/PictureInPicture"},{"title":"Screenshare","icon":"screencast","href":"/v1/sdks/react/broadcast/Screenshare"},{"title":"Source","icon":"sliders","href":"/v1/sdks/react/broadcast/Source"},{"title":"Status","icon":"wave-pulse","href":"/v1/sdks/react/broadcast/Status"}]},{"group":"Functions","pages":[{"title":"getIngest","icon":"link","href":"/v1/sdks/react/broadcast/get-ingest"},{"title":"useBroadcastContext","icon":"database","href":"/v1/sdks/react/broadcast/useBroadcastContext"}]}]},{"group":"Examples","icon":"clipboard","pages":[{"title":"Player","href":"/v1/sdks/react/Player"},{"title":"Broadcast","href":"/v1/sdks/react/Broadcast"}]},{"group":"Migration","icon":"right-left","pages":[{"title":"Migration Guide for 4+","href":"/v1/sdks/react/migration/migration-4.x"},{"group":"Livepeer React (3.x and below)","pages":[{"title":"Getting Started","href":"/v1/sdks/react/migration/3.x/getting-started"},{"title":"Client","href":"/v1/sdks/react/migration/3.x/client"},{"title":"LivepeerConfig","href":"/v1/sdks/react/migration/3.x/LivepeerConfig"},{"title":"Player","href":"/v1/sdks/react/migration/3.x/Player"},{"title":"Broadcast","href":"/v1/sdks/react/migration/3.x/Broadcast"},{"group":"Asset","pages":[{"title":"useCreateAsset","href":"/v1/sdks/react/migration/3.x/asset/useCreateAsset"},{"title":"useAsset","href":"/v1/sdks/react/migration/3.x/asset/useAsset"},{"title":"useUpdateAsset","href":"/v1/sdks/react/migration/3.x/asset/useUpdateAsset"},{"title":"useAssetMetrics","href":"/v1/sdks/react/migration/3.x/asset/useAssetMetrics"}]},{"group":"Stream","pages":[{"title":"useCreateStream","href":"/v1/sdks/react/migration/3.x/stream/useCreateStream"},{"title":"useStream","href":"/v1/sdks/react/migration/3.x/stream/useStream"},{"title":"useUpdateStream","href":"/v1/sdks/react/migration/3.x/stream/useUpdateStream"},{"title":"useStreamSession","href":"/v1/sdks/react/migration/3.x/stream/useStreamSession"},{"title":"useStreamSessions","href":"/v1/sdks/react/migration/3.x/stream/useStreamSessions"}]},{"group":"Playback","pages":[{"title":"usePlaybackInfo","href":"/v1/sdks/react/migration/3.x/playback/usePlaybackInfo"}]},{"group":"Constants","pages":[{"title":"Application Binary Interface","href":"/v1/sdks/react/migration/3.x/constants/abis"},{"title":"Contract Addresses","href":"/v1/sdks/react/migration/3.x/constants/contract-addresses"}]}]}]}]}]},{"anchor":"AI Video (Beta)","icon":{"style":"regular","name":"microchip-ai"},"groups":[{"group":"AI Video","pages":[{"title":"What is Livepeer AI?","icon":"microchip-ai","iconType":"regular","href":"/v1/ai/introduction"},{"title":"What's New","icon":"rocket","url":"https://livepeer-ai.productlane.com/changelog","href":"/v1/ai/whats-new"},{"group":"AI Pipelines","icon":{"style":"solid","name":"wand-magic-sparkles"},"pages":[{"title":"Overview","href":"/v1/ai/pipelines/overview"},{"title":"Audio-to-Text","href":"/v1/ai/pipelines/audio-to-text"},{"title":"Image-to-Image","href":"/v1/ai/pipelines/image-to-image"},{"title":"Image-to-Text","href":"/v1/ai/pipelines/image-to-text"},{"title":"Image-to-Video","href":"/v1/ai/pipelines/image-to-video"},{"title":"LLM","href":"/v1/ai/pipelines/llm"},{"title":"Segment-Anything-2","href":"/v1/ai/pipelines/segment-anything-2"},{"title":"Text-to-Image","href":"/v1/ai/pipelines/text-to-image"},{"title":"Text-to-Speech","href":"/v1/ai/pipelines/text-to-speech"},{"title":"Upscale","href":"/v1/ai/pipelines/upscale"}]},{"group":"Setup an AI Orchestrator","icon":{"style":"solid","name":"robot"},"pages":[{"title":"Get Started","href":"/v1/ai/orchestrators/get-started"},{"title":"Configuring AI Models","href":"/v1/ai/orchestrators/models-config"},{"title":"Download AI Models","href":"/v1/ai/orchestrators/models-download"},{"title":"Start your AI Orchestrator","href":"/v1/ai/orchestrators/start-orchestrator"},{"title":"Attach Remote AI Workers","href":"/v1/ai/orchestrators/ai-worker"},{"title":"Perform Benchmarking","href":"/v1/ai/orchestrators/benchmarking"},{"title":"On-chain Setup","href":"/v1/ai/orchestrators/onchain"}]},{"group":"Setup an AI Gateway","icon":{"style":"solid","name":"signal-stream"},"pages":[{"title":"Get Started","href":"/v1/ai/gateways/get-started"},{"title":null,"href":"/v1/ai/gateways/start-gateway"},{"title":null,"href":"/v1/ai/gateways/onchain"}]},{"group":"AI Builders","icon":{"style":"solid","name":"screwdriver-wrench"},"pages":[{"title":"Building on Livepeer AI","href":"/v1/ai/builders/get-started"},{"title":"AI Gateways","href":"/v1/ai/builders/gateways"},{"title":"Showcase","href":"/v1/ai/builders/showcase"}]},{"group":"How to Contribute","icon":{"style":"solid","name":"heart"},"pages":[{"title":"Get Started","href":"/v1/ai/contributors/coming-soon"}]},{"group":"SDKs","icon":"brackets-curly","pages":[{"title":"AI SDKs","sidebarTitle":"Overview","href":"/v1/ai/sdks/overview"},{"title":"Go","icon":"golang","href":"/v1/ai/sdks/go"},{"title":"JavaScript","icon":"js","href":"/v1/ai/sdks/javascript"},{"title":"Python","icon":"python","href":"/v1/ai/sdks/python"}]},{"group":"AI API Reference","icon":"rectangle-terminal","pages":[{"title":"Introduction","href":"/v1/ai/api-reference/overview"},{"openapi":"post /audio-to-text","title":"Audio To Text","href":"/v1/ai/api-reference/audio-to-text"},{"openapi":"post /image-to-image","title":"Image To Image","href":"/v1/ai/api-reference/image-to-image"},{"openapi":"post /image-to-text","title":"Image To Text","href":"/v1/ai/api-reference/image-to-text"},{"openapi":"post /image-to-video","title":"Image To Video","href":"/v1/ai/api-reference/image-to-video"},{"openapi":"post /llm","title":"LLM","href":"/v1/ai/api-reference/llm"},{"openapi":"post /segment-anything-2","title":"Segment Anything 2","href":"/v1/ai/api-reference/segment-anything-2"},{"openapi":"post /text-to-image","title":"Text To Image","href":"/v1/ai/api-reference/text-to-image"},{"openapi":"post /text-to-speech","title":"Text To Speech","href":"/v1/ai/api-reference/text-to-speech"},{"openapi":"post /upscale","title":"Upscale","href":"/v1/ai/api-reference/upscale"}]}]}]},{"anchor":" ","icon":"horizontal-rule"},{"anchor":"Livepeer Studio ➚","icon":"clapperboard-play","href":"https://livepeer.studio"},{"anchor":"What's New ➚","icon":"rocket","href":"https://livepeer.canny.io/changelog"},{"anchor":"Community ➚","icon":{"style":"brands","name":"discord"},"href":"https://discord.gg/livepeer"}]},{"dropdown":"Gateways","icon":"torii-gate","anchors":[{"anchor":"Documentation","icon":"code","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","icon":"hand-wave","href":"/v1/gateways/introduction"},{"title":"Quickstart","icon":"bolt","href":"/v1/gateways/quick-start"},{"title":"CLI","icon":"rectangle-terminal","href":"/v1/gateways/livepeer-studio-cli"}]},{"group":"Guides","pages":[{"title":"Overview","icon":"Rocket","href":"/v1/gateways/guides/gateway-overview"},{"title":"Docker Install","icon":"download","href":"/v1/gateways/guides/docker-install"},{"title":"Linux Install","icon":"download","href":"/v1/gateways/guides/linux-install"},{"title":"Windows Install","icon":"download","href":"/v1/gateways/guides/windows-install"},{"title":"Configure Transcoding Options","icon":"gear","href":"/v1/gateways/guides/transcoding-options"},{"title":"Fund The Livepeer Gateway","icon":"ethereum","href":"/v1/gateways/guides/fund-gateway"},{"title":"Publish Content","icon":"upload","href":"/v1/gateways/guides/publish-content"},{"title":"Playback Content","icon":"circle-play","href":"/v1/gateways/guides/playback-content"}]},{"group":"References","pages":[{"title":"API Support Matrix","icon":"list-check","href":"/v1/references/api-support-matrix"},{"group":"Livepeer Node Software","icon":"golang","pages":[{"title":"Bandwidth Requirements","href":"/v1/references/go-livepeer/bandwidth-requirements"},{"title":"CLI Reference","href":"/v1/references/go-livepeer/cli-reference"},{"title":"GPU Support","href":"/v1/references/go-livepeer/gpu-support"},{"title":"Hardware Requirements","href":"/v1/references/go-livepeer/hardware-requirements"},{"title":"Prometheus Metrics","href":"/v1/references/go-livepeer/prometheus-metrics"}]},{"title":"Contract Addresses","sidebarTitle":"Contract Addresses","href":"/v1/references/contract-addresses"},{"title":"Example Applications","icon":"grid-round-2-plus","href":"/v1/references/example-applications"},{"title":"Awesome Livepeer","url":"https://github.com/livepeer/awesome-livepeer","icon":"stars","href":"/v1/references/awesome-livepeer"},{"group":"FAQs","icon":"book","pages":[{"title":null,"href":"/v1/references/knowledge-base/livestream"},{"title":null,"href":"/v1/references/knowledge-base/playback"},{"title":null,"href":"/v1/references/knowledge-base/vod"}]}]}]},{"anchor":"API Reference","icon":"rectangle-terminal","groups":[{"group":"Overview","pages":[{"title":"Introduction","icon":"hand-wave","href":"/v1/api-reference/overview/introduction"},{"title":"Authentication","icon":"lock","href":"/v1/api-reference/overview/authentication"}]},{"group":"APIs","pages":[{"group":"Asset","icon":"video","pages":[{"title":null,"href":"/v1/api-reference/asset/overview"},{"title":"Upload an asset","openapi":"POST /asset/request-upload","href":"/v1/api-reference/asset/upload"},{"title":"Upload asset via URL","openapi":"POST /asset/upload/url","href":"/v1/api-reference/asset/upload-via-url"},{"title":"Retrieve an asset","openapi":"GET /asset/{assetId}","href":"/v1/api-reference/asset/get"},{"title":"Update an asset","openapi":"PATCH /asset/{assetId}","href":"/v1/api-reference/asset/update"},{"title":"Delete an asset","openapi":"DELETE /asset/{assetId}","href":"/v1/api-reference/asset/delete"},{"title":"Retrieve assets","openapi":"GET /asset","href":"/v1/api-reference/asset/get-all"}]},{"group":"Livestream","icon":"camera","pages":[{"title":null,"href":"/v1/api-reference/stream/overview"},{"title":"Create a livestream","openapi":"POST /stream","href":"/v1/api-reference/stream/create"},{"title":"Retrieve a livestream","openapi":"GET /stream/{id}","href":"/v1/api-reference/stream/get"},{"title":"Update a livestream","openapi":"PATCH /stream/{id}","href":"/v1/api-reference/stream/update"},{"title":"Terminates a livestream","openapi":"DELETE /stream/{id}/terminate","href":"/v1/api-reference/stream/terminate"},{"title":"Add a multistream target","openapi":"POST /stream/{id}/create-multistream-target","href":"/v1/api-reference/stream/add-multistream-target"},{"title":"Remove a multistream target","openapi":"DELETE /stream/{id}/multistream/{targetId}","href":"/v1/api-reference/stream/delete-multistream-target"},{"title":"Delete a livestream","openapi":"DELETE /stream/{id}","href":"/v1/api-reference/stream/delete"},{"title":"Retrieve all livestreams","openapi":"GET /stream","href":"/v1/api-reference/stream/get-all"},{"title":"Create a clip","openapi":"POST /clip","href":"/v1/api-reference/stream/create-clip"},{"title":"Retrieve clips of a livestream","openapi":"GET /stream/{id}/clips","href":"/v1/api-reference/stream/get-clip"}]},{"group":"Generate","icon":"microchip-ai","pages":[{"title":null,"href":"/v1/api-reference/generate/overview"},{"title":"Audio To Text","openapi":"POST /api/beta/generate/audio-to-text","href":"/v1/api-reference/generate/audio-to-text"},{"title":"Text To Image","openapi":"POST /api/beta/generate/text-to-image","href":"/v1/api-reference/generate/text-to-image"},{"title":"Image To Image","openapi":"POST /api/beta/generate/image-to-image","href":"/v1/api-reference/generate/image-to-image"},{"title":"Image To Video","openapi":"POST /api/beta/generate/image-to-video","href":"/v1/api-reference/generate/image-to-video"},{"title":"LLM","href":"/v1/api-reference/generate/llm"},{"title":"Segment Anything 2","openapi":"POST /api/beta/generate/segment-anything-2","href":"/v1/api-reference/generate/segment-anything-2"},{"title":"Upscale","openapi":"POST /api/beta/generate/upscale","href":"/v1/api-reference/generate/upscale"}]},{"group":"Multistream target","icon":"arrows-split-up-and-left","pages":[{"title":null,"href":"/v1/api-reference/multistream/overview"},{"title":"Create a multistream","openapi":"POST /multistream/target","href":"/v1/api-reference/multistream/create"},{"title":"Retrieve a multistream","openapi":"GET /multistream/target/{id}","href":"/v1/api-reference/multistream/get"},{"title":"Update a multistream","openapi":"PATCH /multistream/target/{id}","href":"/v1/api-reference/multistream/update"},{"title":"Delete a multistream","openapi":"DELETE /multistream/target/{id}","href":"/v1/api-reference/multistream/delete"},{"title":"Retrieve all multistreams","openapi":"GET /multistream/target","href":"/v1/api-reference/multistream/get-all"}]},{"group":"Session","icon":"film","pages":[{"title":null,"href":"/v1/api-reference/session/overview"},{"title":"Retrieve a session","openapi":"GET /session/{id}","href":"/v1/api-reference/session/get"},{"title":"Retrieve all sessions","openapi":"GET /session","href":"/v1/api-reference/session/get-all"},{"title":"Retrieve recorded sessions","openapi":"GET /stream/{parentId}/sessions","href":"/v1/api-reference/session/get-recording"},{"title":"Retrieve clips of a session","openapi":"GET /session/{id}/clips","href":"/v1/api-reference/session/get-clip"}]},{"group":"Access control","icon":"lock","pages":[{"title":null,"href":"/v1/api-reference/signing-key/overview"},{"title":"Create a signing key","openapi":"POST /access-control/signing-key","href":"/v1/api-reference/signing-key/create"},{"title":"Retrieve a signing key","openapi":"GET /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/get"},{"title":"Update a signing key","openapi":"PATCH /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/update"},{"title":"Delete a signing key","openapi":"DELETE /access-control/signing-key/{keyId}","href":"/v1/api-reference/signing-key/delete"},{"title":"Retrieve signing keys","openapi":"GET /access-control/signing-key","href":"/v1/api-reference/signing-key/get-all"}]},{"group":"Webhook","icon":"bell","pages":[{"title":null,"href":"/v1/api-reference/webhook/overview"},{"title":"Create a webhook","openapi":"POST /webhook","href":"/v1/api-reference/webhook/create"},{"title":"Retrieve a webhook","openapi":"GET /webhook/{id}","href":"/v1/api-reference/webhook/get"},{"title":"Update a webhook","openapi":"PUT /webhook/{id}","href":"/v1/api-reference/webhook/update"},{"title":"Delete a webhook","openapi":"DELETE /webhook/{id}","href":"/v1/api-reference/webhook/delete"},{"title":"Retrieve all webhooks","openapi":"GET /webhook","href":"/v1/api-reference/webhook/get-all"}]},{"group":"Task","icon":"gear","pages":[{"title":null,"href":"/v1/api-reference/task/overview"},{"title":"Retrieve tasks","openapi":"GET /task","href":"/v1/api-reference/task/get-all"},{"title":"Retrieve a task","openapi":"GET /task/{taskId}","href":"/v1/api-reference/task/get"}]},{"group":"Playback","icon":"play","pages":[{"title":null,"href":"/v1/api-reference/playback/overview"},{"title":"Retrieve Playback Info","openapi":"GET /playback/{id}","href":"/v1/api-reference/playback/get"}]},{"group":"Transcode","icon":"photo-film","pages":[{"title":null,"href":"/v1/api-reference/transcode/overview"},{"title":"Transcode a video","openapi":"POST /transcode","href":"/v1/api-reference/transcode/create"}]},{"group":"Viewership","icon":"chart-bar","pages":[{"title":"Query realtime viewership","openapi":"GET /data/views/now","href":"/v1/api-reference/viewership/get-realtime-viewership"},{"title":"Query viewership metrics","openapi":"GET /data/views/query","href":"/v1/api-reference/viewership/get-viewership-metrics"},{"title":"Query usage metrics","openapi":"GET /data/usage/query","href":"/v1/api-reference/viewership/get-usage-metrics"},{"title":"Query public total views metrics","openapi":"GET /data/views/query/total/{playbackId}","href":"/v1/api-reference/viewership/get-public-total-views"},{"title":"Query creator viewership metrics","openapi":"GET /data/views/query/creator","href":"/v1/api-reference/viewership/get-creators-metrics"}]}]}]},{"anchor":"SDKs","icon":"brackets-curly","groups":[{"group":"Overview","pages":[{"title":"SDKs","sidebarTitle":"Introduction","href":"/v1/sdks/introduction"}]},{"group":"Server-side SDKs","pages":[{"title":"JavaScript","icon":"js","href":"/v1/sdks/javascript"},{"title":"Go","icon":"golang","href":"/v1/sdks/go"},{"title":"Python","icon":"python","href":"/v1/sdks/python"}]},{"group":"React Components","icon":"circle-play","pages":[{"title":"Getting Started","href":"/v1/sdks/react/getting-started"},{"group":"Player","icon":"circle-play","pages":[{"title":"Root","icon":"flag-checkered","href":"/v1/sdks/react/player/Root"},{"title":"Container","icon":"tv","href":"/v1/sdks/react/player/Container"},{"title":"Video","icon":"video","href":"/v1/sdks/react/player/Video"},{"title":"Error","icon":"triangle-exclamation","href":"/v1/sdks/react/player/Error"},{"title":"Loading","icon":"spinner","href":"/v1/sdks/react/player/Loading"},{"title":"Portal","icon":"person-to-portal","href":"/v1/sdks/react/player/Portal"},{"title":"Poster","icon":"image","href":"/v1/sdks/react/player/Poster"},{"group":"Controls","pages":[{"title":"Controls","icon":"gamepad","href":"/v1/sdks/react/player/Controls"},{"title":"Clip","icon":"scissors","href":"/v1/sdks/react/player/Clip"},{"title":"Fullscreen","icon":"expand","href":"/v1/sdks/react/player/Fullscreen"},{"title":"Live","icon":"headset","href":"/v1/sdks/react/player/Live"},{"title":"Picture in Picture","icon":"clone","href":"/v1/sdks/react/player/PictureInPicture"},{"title":"Play","icon":"play","href":"/v1/sdks/react/player/Play"},{"title":"Playback Speed","icon":"gauge-simple-high","href":"/v1/sdks/react/player/RateSelect"},{"title":"Seek","icon":"forward","href":"/v1/sdks/react/player/Seek"},{"title":"Time","icon":"clock","href":"/v1/sdks/react/player/Time"},{"title":"Video Quality","icon":"signal","href":"/v1/sdks/react/player/VideoQualitySelect"},{"title":"Volume","icon":"volume-high","href":"/v1/sdks/react/player/Volume"}]},{"group":"Functions","pages":[{"title":"getSrc","icon":"link","href":"/v1/sdks/react/player/get-src"},{"title":"useMediaContext","icon":"database","href":"/v1/sdks/react/player/useMediaContext"}]}]},{"group":"Broadcast","icon":"signal-stream","pages":[{"title":"Root","icon":"flag-checkered","href":"/v1/sdks/react/broadcast/Root"},{"title":"Container","icon":"tv","href":"/v1/sdks/react/broadcast/Container"},{"title":"Video","icon":"video","href":"/v1/sdks/react/broadcast/Video"},{"title":"Enable","icon":"clapperboard","href":"/v1/sdks/react/broadcast/Enabled"},{"title":"Error","icon":"triangle-exclamation","href":"/v1/sdks/react/broadcast/Error"},{"title":"Loading","icon":"spinner","href":"/v1/sdks/react/broadcast/Loading"},{"title":"Portal","icon":"person-to-portal","href":"/v1/sdks/react/broadcast/Portal"},{"group":"Controls","pages":[{"title":"Controls","icon":"gamepad","href":"/v1/sdks/react/broadcast/Controls"},{"title":"Audio","icon":"microphone-stand","href":"/v1/sdks/react/broadcast/Audio"},{"title":"Camera","icon":"camcorder","href":"/v1/sdks/react/broadcast/Camera"},{"title":"Fullscreen","icon":"expand","href":"/v1/sdks/react/broadcast/Fullscreen"},{"title":"Picture in Picture","icon":"clone","href":"/v1/sdks/react/broadcast/PictureInPicture"},{"title":"Screenshare","icon":"screencast","href":"/v1/sdks/react/broadcast/Screenshare"},{"title":"Source","icon":"sliders","href":"/v1/sdks/react/broadcast/Source"},{"title":"Status","icon":"wave-pulse","href":"/v1/sdks/react/broadcast/Status"}]},{"group":"Functions","pages":[{"title":"getIngest","icon":"link","href":"/v1/sdks/react/broadcast/get-ingest"},{"title":"useBroadcastContext","icon":"database","href":"/v1/sdks/react/broadcast/useBroadcastContext"}]}]},{"group":"Examples","icon":"clipboard","pages":[{"title":"Player","href":"/v1/sdks/react/Player"},{"title":"Broadcast","href":"/v1/sdks/react/Broadcast"}]},{"group":"Migration","icon":"right-left","pages":[{"title":"Migration Guide for 4+","href":"/v1/sdks/react/migration/migration-4.x"},{"group":"Livepeer React (3.x and below)","pages":[{"title":"Getting Started","href":"/v1/sdks/react/migration/3.x/getting-started"},{"title":"Client","href":"/v1/sdks/react/migration/3.x/client"},{"title":"LivepeerConfig","href":"/v1/sdks/react/migration/3.x/LivepeerConfig"},{"title":"Player","href":"/v1/sdks/react/migration/3.x/Player"},{"title":"Broadcast","href":"/v1/sdks/react/migration/3.x/Broadcast"},{"group":"Asset","pages":[{"title":"useCreateAsset","href":"/v1/sdks/react/migration/3.x/asset/useCreateAsset"},{"title":"useAsset","href":"/v1/sdks/react/migration/3.x/asset/useAsset"},{"title":"useUpdateAsset","href":"/v1/sdks/react/migration/3.x/asset/useUpdateAsset"},{"title":"useAssetMetrics","href":"/v1/sdks/react/migration/3.x/asset/useAssetMetrics"}]},{"group":"Stream","pages":[{"title":"useCreateStream","href":"/v1/sdks/react/migration/3.x/stream/useCreateStream"},{"title":"useStream","href":"/v1/sdks/react/migration/3.x/stream/useStream"},{"title":"useUpdateStream","href":"/v1/sdks/react/migration/3.x/stream/useUpdateStream"},{"title":"useStreamSession","href":"/v1/sdks/react/migration/3.x/stream/useStreamSession"},{"title":"useStreamSessions","href":"/v1/sdks/react/migration/3.x/stream/useStreamSessions"}]},{"group":"Playback","pages":[{"title":"usePlaybackInfo","href":"/v1/sdks/react/migration/3.x/playback/usePlaybackInfo"}]},{"group":"Constants","pages":[{"title":"Application Binary Interface","href":"/v1/sdks/react/migration/3.x/constants/abis"},{"title":"Contract Addresses","href":"/v1/sdks/react/migration/3.x/constants/contract-addresses"}]}]}]}]}]},{"anchor":"AI Video (Beta)","icon":{"style":"regular","name":"microchip-ai"},"groups":[{"group":"AI Video","pages":[{"title":"What is Livepeer AI?","icon":"microchip-ai","iconType":"regular","href":"/v1/ai/introduction"},{"title":"What's New","icon":"rocket","url":"https://livepeer-ai.productlane.com/changelog","href":"/v1/ai/whats-new"},{"group":"AI Pipelines","icon":{"style":"solid","name":"wand-magic-sparkles"},"pages":[{"title":"Overview","href":"/v1/ai/pipelines/overview"},{"title":"Audio-to-Text","href":"/v1/ai/pipelines/audio-to-text"},{"title":"Image-to-Image","href":"/v1/ai/pipelines/image-to-image"},{"title":"Image-to-Text","href":"/v1/ai/pipelines/image-to-text"},{"title":"Image-to-Video","href":"/v1/ai/pipelines/image-to-video"},{"title":"LLM","href":"/v1/ai/pipelines/llm"},{"title":"Segment-Anything-2","href":"/v1/ai/pipelines/segment-anything-2"},{"title":"Text-to-Image","href":"/v1/ai/pipelines/text-to-image"},{"title":"Text-to-Speech","href":"/v1/ai/pipelines/text-to-speech"},{"title":"Upscale","href":"/v1/ai/pipelines/upscale"}]},{"group":"Setup an AI Orchestrator","icon":{"style":"solid","name":"robot"},"pages":[{"title":"Get Started","href":"/v1/ai/orchestrators/get-started"},{"title":"Configuring AI Models","href":"/v1/ai/orchestrators/models-config"},{"title":"Download AI Models","href":"/v1/ai/orchestrators/models-download"},{"title":"Start your AI Orchestrator","href":"/v1/ai/orchestrators/start-orchestrator"},{"title":"Attach Remote AI Workers","href":"/v1/ai/orchestrators/ai-worker"},{"title":"Perform Benchmarking","href":"/v1/ai/orchestrators/benchmarking"},{"title":"On-chain Setup","href":"/v1/ai/orchestrators/onchain"}]},{"group":"Setup an AI Gateway","icon":{"style":"solid","name":"signal-stream"},"pages":[{"title":"Get Started","href":"/v1/ai/gateways/get-started"},{"title":null,"href":"/v1/ai/gateways/start-gateway"},{"title":null,"href":"/v1/ai/gateways/onchain"}]},{"group":"AI Builders","icon":{"style":"solid","name":"screwdriver-wrench"},"pages":[{"title":"Building on Livepeer AI","href":"/v1/ai/builders/get-started"},{"title":"AI Gateways","href":"/v1/ai/builders/gateways"},{"title":"Showcase","href":"/v1/ai/builders/showcase"}]},{"group":"How to Contribute","icon":{"style":"solid","name":"heart"},"pages":[{"title":"Get Started","href":"/v1/ai/contributors/coming-soon"}]},{"group":"SDKs","icon":"brackets-curly","pages":[{"title":"AI SDKs","sidebarTitle":"Overview","href":"/v1/ai/sdks/overview"},{"title":"Go","icon":"golang","href":"/v1/ai/sdks/go"},{"title":"JavaScript","icon":"js","href":"/v1/ai/sdks/javascript"},{"title":"Python","icon":"python","href":"/v1/ai/sdks/python"}]},{"group":"AI API Reference","icon":"rectangle-terminal","pages":[{"title":"Introduction","href":"/v1/ai/api-reference/overview"},{"openapi":"post /audio-to-text","title":"Audio To Text","href":"/v1/ai/api-reference/audio-to-text"},{"openapi":"post /image-to-image","title":"Image To Image","href":"/v1/ai/api-reference/image-to-image"},{"openapi":"post /image-to-text","title":"Image To Text","href":"/v1/ai/api-reference/image-to-text"},{"openapi":"post /image-to-video","title":"Image To Video","href":"/v1/ai/api-reference/image-to-video"},{"openapi":"post /llm","title":"LLM","href":"/v1/ai/api-reference/llm"},{"openapi":"post /segment-anything-2","title":"Segment Anything 2","href":"/v1/ai/api-reference/segment-anything-2"},{"openapi":"post /text-to-image","title":"Text To Image","href":"/v1/ai/api-reference/text-to-image"},{"openapi":"post /text-to-speech","title":"Text To Speech","href":"/v1/ai/api-reference/text-to-speech"},{"openapi":"post /upscale","title":"Upscale","href":"/v1/ai/api-reference/upscale"}]}]}]},{"anchor":" ","icon":"horizontal-rule"},{"anchor":"Livepeer Studio ➚","icon":"clapperboard-play","href":"https://livepeer.studio"},{"anchor":"What's New ➚","icon":"rocket","href":"https://livepeer.canny.io/changelog"},{"anchor":"Community ➚","icon":{"style":"brands","name":"discord"},"href":"https://discord.gg/livepeer"}]}]}]},{"version":"v2","default":false,"pages":[{"title":"v2","href":"/v2/developers/guides/developer-guides"}]}]},"basePath":"","title":"Play from IPFS - Livepeer Docs","deploymentId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","buildId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","dynamics":["07c022d89b","6d89261695","a74be98ba7"],"chunks":["Frame-BNZBpOKW.js","DynamicMarkdown-F4EfLno9.js","preview-widget-OgaTV5RT.js","zoom-image-lightbox-CbF0jxOW.js","lightbox-handle-r17bVUz3.js"]}