Skip to content

Commit

Permalink
merged demo (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathandion authored Sep 27, 2023
1 parent a26e103 commit 0289d74
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 83 deletions.
2 changes: 1 addition & 1 deletion docs/pages/cast/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@ const MyComponent = () => {

### Done 🎉

You should now have the capability to cast your media. For more complex use cases, please explore the [examples](https://github.com/jonathandion/mono/tree/main/examples) folder. If you're interested in enhancing the documentation, feel free to contribute.
You should now have the capability to cast your media. For more complex use cases, please explore the [examples](https://github.com/jonathandion/mono/tree/main/examples/cast) folder. If you're interested in enhancing the documentation, feel free to contribute.

</Steps>
Empty file.
24 changes: 0 additions & 24 deletions examples/cast-vanilla-example/.gitignore

This file was deleted.

18 changes: 0 additions & 18 deletions examples/cast-vanilla-example/package.json

This file was deleted.

1 change: 0 additions & 1 deletion examples/cast-vanilla-example/src/vite-env.d.ts

This file was deleted.

8 changes: 0 additions & 8 deletions examples/cast-vanilla-example/tsconfig.json

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions examples/cast/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Cast Demo
14 changes: 14 additions & 0 deletions examples/cast/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cast Demo</title>
</head>
<body>
<h1>Cast Demo</h1>
<a href="./pages/react/index.html">React</a>
<br />
<a href="./pages/vanilla/index.html">Vanilla JS</a>
</body>
</html>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cast React Demo</title>
<title>Cast Demo</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<h1>Demo React</h1>
<div id="root"></div>
<script type="module" src="../../src/cast-react/main.tsx"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cast Vanilla Demo</title>
</head>

<body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cast Demo</title>
</head>
<body>
<h1>Demo Vanilla JS</h1>
<fieldset>
<button id="start-cast-button">Start Cast</button>
<button id="end-cast-button">End Cast</button>
Expand All @@ -32,11 +31,12 @@
<label>Time <span id="time"></span></label>
<br />
</fieldset>

<h2>Cast State</h2>
<pre id="cast-state"></pre>
<h2>Player State</h2>
<pre id="player-state"></pre>
<script type="module" src="/src/main.ts"></script>
</body>

<script type="module" src="../../src/cast/main.ts"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// eslint-disable-next-line import/default
import React from 'react'
import { createRoot } from 'react-dom/client'
import { CastDemo } from './cast/cast.component'
import { CastDemo } from './cast.component'
import { CastProvider } from '@jdion/cast-react'
import { castInstance } from './cast/cast.instance'
import { castInstance } from '../cast/cast.instance'

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
createRoot(document.getElementById('root')!).render(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 16 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0289d74

Please sign in to comment.