Skip to content

Commit 1b14eb6

Browse files
authored
Adjust imports for livestream module (#180)
1 parent e858b92 commit 1b14eb6

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

docs/explanation/public-livestreams.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Once you've created a viewer token, you can connect to a room using the Fishjam
142142
import {
143143
LivestreamViewer,
144144
useLivestreamViewer,
145-
} from '@fishjam-cloud/react-native-client';
145+
} from '@fishjam-cloud/react-native-client/livestream';
146146

147147
// ...
148148

@@ -206,7 +206,7 @@ Once you've created a room of type `livestream` with the `public` flag enabled,
206206
import {
207207
LivestreamViewer,
208208
useLivestreamViewer,
209-
} from '@fishjam-cloud/react-native-client';
209+
} from '@fishjam-cloud/react-native-client/livestream';
210210

211211
// ...
212212

docs/tutorials/livestreaming.mdx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,15 @@ We can now start sending media, which we can obtain from the user's camera, scre
145145
```tsx
146146
import React from 'react';
147147

148-
const streamerToken = '';
149-
const roomId = '';
150-
151-
// ---cut---
148+
// All components and hooks needed for livestreaming can be imported from the livestream module
152149
import {
153150
LivestreamStreamer,
154151
useLivestreamStreamer,
155152
cameras,
156-
} from '@fishjam-cloud/react-native-client';
153+
} from '@fishjam-cloud/react-native-client/livestream';
157154

155+
const streamerToken = '';
156+
const roomId = '';
158157
const { connect, whipClientRef } = useLivestreamStreamer();
159158

160159
// ...
@@ -254,7 +253,7 @@ We can now begin receiving the stream
254253
import {
255254
LivestreamViewer,
256255
useLivestreamViewer,
257-
} from '@fishjam-cloud/react-native-client';
256+
} from '@fishjam-cloud/react-native-client/livestream';
258257

259258
const { connect } = useLivestreamViewer();
260259

0 commit comments

Comments
 (0)