Skip to content

Conversation

@oliverlaz
Copy link
Member

Overview

Exposes the useOwnCapabilities() and useHasPermissions() through useCallStateHooks().
These two hooks are sourcing their data from call.state -> hence they belong to useCallStateHooks().
This change should have been done with 0.3.0 but it seems we missed these two hooks.

Breaking change

Although possibly breaking, the impact of this change should be relatively small. The ones impacted shall adjust their code according to the example below:

// before
import { 
  useHasPermissions, 
  useOwnCapabilities,
  OwnCapability,
} from '@stream-io/video-react-sdk'; // or '@stream-io/video-react-native-sdk'

const MyComponent = () => {
  const myCapabilities = useOwnCapabilities();
  const hasPermissions = useHasPermissions(OwnCapability.SEND_AUDIO);
  // ...
}

// after
import { 
  useCallStateHooks,
  OwnCapability,
} from '@stream-io/video-react-sdk'; // or '@stream-io/video-react-native-sdk'

const MyComponent = () => {
  const { useHasPermissions, useOwnCapabilities } = useCallStateHooks();
  const myCapabilities = useOwnCapabilities();
  const hasPermissions = useHasPermissions(OwnCapability.SEND_AUDIO);
  // ...
}

zwaardje and others added 30 commits December 1, 2023 12:14
- add video device selection button
- add mic device selection button
- style documentation buttons smaller
Assign `data-testid` attributes to the Call Control Buttons.
- allow for a primary and secondary active state on the button
Adds a new feature flag that enables General Location randomization.
Once enabled, Pronto will send a randomly selected location to our
backend.

### Notes
On larger calls, we want to ensure that participants are assigned to
random SFUs around the globe. Hopefully, this will help us detect some
edge cases with Cascading.
Adds an experimental waiting room functionality in Pronto built on top of `custom` events.

For more information, check:
https://getstream.slack.com/archives/C022N8JNQGZ/p1706886559355909thread_ts=1706212004.817829&cid=C022N8JNQGZ
# Conflicts:
#	packages/react-sdk/CHANGELOG.md
#	yarn.lock
Base automatically changed from feature/WD-1079 to main February 26, 2024 14:10
# Conflicts:
#	sample-apps/react/react-dogfood/components/MeetingUI.tsx
#	sample-apps/react/react-dogfood/hooks/useGleap.ts
@oliverlaz oliverlaz merged commit 3eaa8bd into main Feb 26, 2024
@oliverlaz oliverlaz deleted the permissions-hook branch February 26, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants