Live video on the AT Protocol
1# @streamplace/components
2
3Heavily WIP but looks something like this:
4
5```tsx
6import {
7 StreamplaceProvider,
8 LivestreamProvider,
9} from "@streamplace/components";
10
11export function Provider() {
12 <StreamplaceProvider url="https://stream.place" oauthSession={userSession}>
13 {/* Everything inside of here can access that Streamplace node */}
14
15 <LivestreamProvider src="example.bsky.social" /* or did:plc:xxxx */>
16 {/* Everything in here has an active subscription to the livestream
17 context via Websocket; things like chat data and stream title */}
18 <App />
19 </LivestreamProvider>
20 </StreamplaceProvider>;
21}
22
23export function App() {
24 const chat = useChat();
25 return (
26 <View>
27 {chat.map((msg) => (
28 <Text>
29 @{msg.author.handle}: {msg.record.text}
30 </Text>
31 ))}
32 </View>
33 );
34}
35```