mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-20 04:51:16 +00:00
docs(browser): add ytjsexample.pages.dev live example
This commit is contained in:
@@ -172,7 +172,8 @@ const player = dashjs.MediaPlayer().create();
|
||||
player.initialize(videoElement, uri, true);
|
||||
```
|
||||
|
||||
Our browser example in [`examples/browser/web`](https://github.com/LuanRT/YouTube.js/blob/main/examples/browser/web) provides a fully working example.
|
||||
A fully working example can be found in [`examples/browser/web`](https://github.com/LuanRT/YouTube.js/blob/main/examples/browser/web). Alternatively, you can view it live at [ytjsexample.pages.dev](https://ytjsexample.pages.dev/).
|
||||
|
||||
<a name="custom-fetch"></a>
|
||||
|
||||
## Providing your own fetch implementation
|
||||
|
||||
@@ -8,6 +8,8 @@ To use YouTube.js in the browser you must proxy requests through your own server
|
||||
|
||||
We'll use our own fetch implementation to proxy requests through our server. This is a simple example, but you can use any fetch implementation you want.
|
||||
|
||||
This example is hosted on [Cloudflare Pages](https://pages.cloudflare.com/) at [ytjsexample.pages.dev](https://ytjsexample.pages.dev/).
|
||||
|
||||
```ts
|
||||
import { Innertube } from "youtubei.js/build/browser";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user