Skip to content

Commit 12906f8

Browse files
committed
add hang-ui readme
1 parent e3b7aea commit 12906f8

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

js/hang-ui/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<p align="center">
2+
<img height="128px" src="https://github.com/kixelated/moq/blob/main/.github/logo.svg" alt="Media over QUIC">
3+
</p>
4+
5+
# @kixelated/hang-ui
6+
7+
[![npm version](https://img.shields.io/npm/v/@kixelated/hang-ui)](https://www.npmjs.com/package/@kixelated/hang-ui)
8+
[![TypeScript](https://img.shields.io/badge/TypeScript-ready-blue.svg)](https://www.typescriptlang.org/)
9+
10+
A TypeScript library for interacting with @kixelated/hang Web Components. Provides methods to control playback and publish sources, as well as status of the connection.
11+
12+
## Installation
13+
14+
```bash
15+
npm add @kixelated/hang-ui
16+
# or
17+
pnpm add @kixelated/hang-ui
18+
yarn add @kixelated/hang-ui
19+
bun add @kixelated/hang-ui
20+
```
21+
22+
## Web Components
23+
24+
Currently, there are two Web Components provided by @kixelated/hang-ui:
25+
26+
- `<hang-watch-ui>`
27+
- `<hang-publish-ui>`
28+
29+
Here's how you can use them (see also @kixelated/hang-demo for a complete example):
30+
31+
```html
32+
<hang-watch-ui>
33+
<hang-watch url="<MOQ relay URL>" path="<relay path>" muted>
34+
<canvas style="width: 100%; height: auto; border-radius: 4px; margin: 0 auto;"></canvas>
35+
</hang-watch>
36+
</hang-watch-ui>
37+
```
38+
39+
```html
40+
<hang-publish-ui>
41+
<hang-publish url="<MOQ relay URL>" path="<relay path>">
42+
<video
43+
style="width: 100%; height: auto; border-radius: 4px; margin: 0 auto;"
44+
muted
45+
autoplay
46+
></video>
47+
</hang-publish>
48+
</hang-publish-ui>
49+
```

0 commit comments

Comments
 (0)