Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/explanation/public-livestreams.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Once you've created a viewer token, you can connect to a room using the Fishjam
const viewerToken = '';

// ---cut---
import { useLivestreamViewer, RTCView } from '@fishjam-cloud/mobile-client';
import { useLivestreamViewer, RTCView } from '@fishjam-cloud/react-native-client';

// Inside your component:
const { connect, stream } = useLivestreamViewer();
Expand Down Expand Up @@ -199,7 +199,7 @@ Once you've created a room of type `livestream` with the `public` flag enabled,
const roomId = '';

// ---cut---
import { useLivestreamViewer, RTCView } from '@fishjam-cloud/mobile-client';
import { useLivestreamViewer, RTCView } from '@fishjam-cloud/react-native-client';

// Inside your component:
const { connect, stream } = useLivestreamViewer();
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to/client/background-streaming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You need to modify `app.json` file and add our plugin:
"plugins": {
...
[
"@fishjam-cloud/mobile-client",
"@fishjam-cloud/react-native-client",
{
"android": {
"enableForegroundService": true
Expand Down Expand Up @@ -96,7 +96,7 @@ granted and only then allow to start a service.
:::

```tsx
import { useCamera, useMicrophone } from "@fishjam-cloud/mobile-client";
import { useCamera, useMicrophone } from "@fishjam-cloud/react-native-client";

const { isCameraOn } = useCamera();
const { isMicrophoneOn } = useMicrophone();
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/client/connecting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const peerToken = await getSandboxPeerToken(roomName, peerName);
<TabItem value="mobile" label="React Native (Mobile)">

```ts
import { useSandbox } from "@fishjam-cloud/mobile-client";
import { useSandbox } from "@fishjam-cloud/react-native-client";
const roomName = "room";
const peerName = "user";
// ---cut---
Expand Down Expand Up @@ -100,7 +100,7 @@ export function JoinRoomButton() {
```tsx
import React, { useCallback } from "react";
import { Button } from "react-native";
import { useConnection, useSandbox } from "@fishjam-cloud/mobile-client";
import { useConnection, useSandbox } from "@fishjam-cloud/react-native-client";

export function JoinRoomButton() {
const { joinRoom } = useConnection(); // [!code highlight]
Expand Down Expand Up @@ -146,7 +146,7 @@ export function LeaveRoomButton() {
```tsx
import React, { useCallback } from "react";
import { Button } from "react-native";
import { useConnection } from "@fishjam-cloud/mobile-client";
import { useConnection } from "@fishjam-cloud/react-native-client";

export function LeaveRoomButton() {
const { leaveRoom } = useConnection(); // [!code highlight]
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/client/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ You can also follow more detailed [Expo instructions](https://docs.expo.dev/get-

## Step 1: Install the Package

Install `@fishjam-cloud/mobile-client` with your preferred package manager.
Install `@fishjam-cloud/react-native-client` with your preferred package manager.

```bash npm2yarn
npm install @fishjam-cloud/mobile-client
npm install @fishjam-cloud/react-native-client
```

## Step 2: Configure App Permissions
Expand Down Expand Up @@ -184,7 +184,7 @@ Wrap your app in the [`FishjamProvider`](../../api/mobile/functions/FishjamProvi

```tsx
import React from "react";
import { FishjamProvider } from "@fishjam-cloud/mobile-client";
import { FishjamProvider } from "@fishjam-cloud/react-native-client";

// Check https://fishjam.io/app/ for your Fishjam ID
const FISHJAM_ID = "your-fishjam-id";
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/client/list-other-peers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function Component() {
```tsx
import React from "react";
import { View, Text } from "react-native";
import { usePeers, RTCView } from "@fishjam-cloud/mobile-client";
import { usePeers, RTCView } from "@fishjam-cloud/react-native-client";

function VideoPlayer({ stream }: { stream: MediaStream | null }) {
if (!stream) return <Text>No video</Text>;
Expand Down
10 changes: 5 additions & 5 deletions docs/how-to/client/managing-devices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The list of the available camera devices is available via the [`cameraDevices`](
```tsx
import React, { useCallback, useState } from "react";
import { Button } from "react-native";
import { useCamera } from "@fishjam-cloud/mobile-client";
import { useCamera } from "@fishjam-cloud/react-native-client";

export function FlipButton() {
const { cameraDevices, selectCamera } = useCamera(); // [!code highlight]
Expand Down Expand Up @@ -109,7 +109,7 @@ You can use [`toggleCamera`](../../api/mobile/functions/useCamera#togglecamera)
```tsx
import { Button } from "react-native";
import React from "react";
import { useCamera } from "@fishjam-cloud/mobile-client";
import { useCamera } from "@fishjam-cloud/react-native-client";

export function ToggleCameraButton() {
const { isCameraOn, toggleCamera } = useCamera(); // [!code highlight]
Expand All @@ -128,7 +128,7 @@ export function ToggleCameraButton() {
```tsx
import { Button, View } from "react-native";
import React from "react";
import { useCamera } from "@fishjam-cloud/mobile-client";
import { useCamera } from "@fishjam-cloud/react-native-client";

export function CameraControls() {
const { startCamera, stopCamera, isCameraOn } = useCamera();
Expand Down Expand Up @@ -174,7 +174,7 @@ You can use [`toggleMicrophone`](../../api/mobile/variables/useMicrophone) to to
```tsx
import { Button } from "react-native";
import React from "react";
import { useMicrophone } from "@fishjam-cloud/mobile-client";
import { useMicrophone } from "@fishjam-cloud/react-native-client";

export function ToggleMicrophoneButton() {
const { isMicrophoneOn, toggleMicrophone } = useMicrophone(); // [!code highlight]
Expand All @@ -193,7 +193,7 @@ export function ToggleMicrophoneButton() {
```tsx
import { Button, View } from "react-native";
import React from "react";
import { useMicrophone } from "@fishjam-cloud/mobile-client";
import { useMicrophone } from "@fishjam-cloud/react-native-client";

export function MicrophoneControls() {
const { startMicrophone, stopMicrophone, isMicrophoneOn } = useMicrophone();
Expand Down
6 changes: 3 additions & 3 deletions docs/how-to/client/metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const PEER_TOKEN = "some-peer-token";
// ---cut---
import React, { useCallback } from "react";
import { Button } from "react-native";
import { useConnection } from "@fishjam-cloud/mobile-client";
import { useConnection } from "@fishjam-cloud/react-native-client";

type PeerMetadata = {
displayName: string;
Expand Down Expand Up @@ -113,7 +113,7 @@ export function JoinRoomButton() {
```tsx
import React, { useCallback } from "react";
import { Button } from "react-native";
import { useUpdatePeerMetadata } from "@fishjam-cloud/mobile-client";
import { useUpdatePeerMetadata } from "@fishjam-cloud/react-native-client";

type PeerMetadata = {
displayName: string;
Expand Down Expand Up @@ -180,7 +180,7 @@ export function ListAllNames() {
```tsx
import React from "react";
import { Text, View } from "react-native";
import { usePeers } from "@fishjam-cloud/mobile-client";
import { usePeers } from "@fishjam-cloud/react-native-client";

type PeerMetadata = {
displayName: string;
Expand Down
Loading
Loading