@stream-io/video-react-native-sdk 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNative.kt +19 -1
- package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +82 -2
- package/dist/commonjs/components/Call/CallContent/CallContent.js +9 -7
- package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js +7 -2
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js +3 -1
- package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/commonjs/components/Livestream/HostLivestream/HostLivestream.js +71 -0
- package/dist/commonjs/components/Livestream/HostLivestream/HostLivestream.js.map +1 -0
- package/dist/commonjs/components/Livestream/HostLivestream/index.js +17 -0
- package/dist/commonjs/components/Livestream/HostLivestream/index.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/HostLivestreamControls.js +69 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/HostLivestreamControls.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js +113 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js +70 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamMediaControls.js +38 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamMediaControls.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +70 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +83 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js +64 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/index.js +61 -0
- package/dist/commonjs/components/Livestream/LivestreamControls/index.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamLayout/LivestreamLayout.js +65 -0
- package/dist/commonjs/components/Livestream/LivestreamLayout/LivestreamLayout.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamLayout/index.js +17 -0
- package/dist/commonjs/components/Livestream/LivestreamLayout/index.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/DurationBadge.js +144 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/DurationBadge.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/FollowerCount.js +71 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/FollowerCount.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/HostLivestreamTopView.js +87 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/HostLivestreamTopView.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js +55 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js +80 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js.map +1 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/index.js +50 -0
- package/dist/commonjs/components/Livestream/LivestreamTopView/index.js.map +1 -0
- package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js +88 -0
- package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -0
- package/dist/commonjs/components/Livestream/ViewerLivestream/index.js +17 -0
- package/dist/commonjs/components/Livestream/ViewerLivestream/index.js.map +1 -0
- package/dist/commonjs/components/Livestream/index.js +61 -0
- package/dist/commonjs/components/Livestream/index.js.map +1 -0
- package/dist/commonjs/components/index.js +11 -0
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/hooks/index.js +22 -0
- package/dist/commonjs/hooks/index.js.map +1 -1
- package/dist/commonjs/hooks/useAutoEnterPiPEffect.js +20 -0
- package/dist/commonjs/hooks/useAutoEnterPiPEffect.js.map +1 -0
- package/dist/commonjs/hooks/useIsInPiPMode.js +25 -0
- package/dist/commonjs/hooks/useIsInPiPMode.js.map +1 -0
- package/dist/commonjs/hooks/usePaginatedLayoutSortPreset.js +26 -0
- package/dist/commonjs/hooks/usePaginatedLayoutSortPreset.js.map +1 -0
- package/dist/commonjs/icons/EndStreamIcon.js +20 -0
- package/dist/commonjs/icons/EndStreamIcon.js.map +1 -0
- package/dist/commonjs/icons/Eye.js +20 -0
- package/dist/commonjs/icons/Eye.js.map +1 -0
- package/dist/commonjs/icons/LeaveStreamIcon.js +20 -0
- package/dist/commonjs/icons/LeaveStreamIcon.js.map +1 -0
- package/dist/commonjs/icons/ShieldBadge.js +20 -0
- package/dist/commonjs/icons/ShieldBadge.js.map +1 -0
- package/dist/commonjs/icons/StartStreamIcon.js +20 -0
- package/dist/commonjs/icons/StartStreamIcon.js.map +1 -0
- package/dist/commonjs/icons/index.js +55 -0
- package/dist/commonjs/icons/index.js.map +1 -1
- package/dist/commonjs/providers/MediaStreamManagement.js +15 -2
- package/dist/commonjs/providers/MediaStreamManagement.js.map +1 -1
- package/dist/commonjs/theme/theme.js +70 -0
- package/dist/commonjs/theme/theme.js.map +1 -1
- package/dist/commonjs/translations/en.json +6 -1
- package/dist/commonjs/utils/enterPiPAndroid.js +15 -0
- package/dist/commonjs/utils/enterPiPAndroid.js.map +1 -0
- package/dist/commonjs/utils/index.js +12 -0
- package/dist/commonjs/utils/index.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/CallContent/CallContent.js +10 -7
- package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js +7 -2
- package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js +3 -1
- package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/module/components/Livestream/HostLivestream/HostLivestream.js +64 -0
- package/dist/module/components/Livestream/HostLivestream/HostLivestream.js.map +1 -0
- package/dist/module/components/Livestream/HostLivestream/index.js +2 -0
- package/dist/module/components/Livestream/HostLivestream/index.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamControls/HostLivestreamControls.js +62 -0
- package/dist/module/components/Livestream/LivestreamControls/HostLivestreamControls.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js +105 -0
- package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js +63 -0
- package/dist/module/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamControls/LivestreamMediaControls.js +31 -0
- package/dist/module/components/Livestream/LivestreamControls/LivestreamMediaControls.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +63 -0
- package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +75 -0
- package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamControls/ViewerLivestreamControls.js +57 -0
- package/dist/module/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamControls/index.js +6 -0
- package/dist/module/components/Livestream/LivestreamControls/index.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamLayout/LivestreamLayout.js +58 -0
- package/dist/module/components/Livestream/LivestreamLayout/LivestreamLayout.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamLayout/index.js +2 -0
- package/dist/module/components/Livestream/LivestreamLayout/index.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamTopView/DurationBadge.js +136 -0
- package/dist/module/components/Livestream/LivestreamTopView/DurationBadge.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamTopView/FollowerCount.js +64 -0
- package/dist/module/components/Livestream/LivestreamTopView/FollowerCount.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamTopView/HostLivestreamTopView.js +80 -0
- package/dist/module/components/Livestream/LivestreamTopView/HostLivestreamTopView.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js +48 -0
- package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js +73 -0
- package/dist/module/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js.map +1 -0
- package/dist/module/components/Livestream/LivestreamTopView/index.js +5 -0
- package/dist/module/components/Livestream/LivestreamTopView/index.js.map +1 -0
- package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js +81 -0
- package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -0
- package/dist/module/components/Livestream/ViewerLivestream/index.js +2 -0
- package/dist/module/components/Livestream/ViewerLivestream/index.js.map +1 -0
- package/dist/module/components/Livestream/index.js +6 -0
- package/dist/module/components/Livestream/index.js.map +1 -0
- package/dist/module/components/index.js +1 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/hooks/index.js +2 -0
- package/dist/module/hooks/index.js.map +1 -1
- package/dist/module/hooks/useAutoEnterPiPEffect.js +14 -0
- package/dist/module/hooks/useAutoEnterPiPEffect.js.map +1 -0
- package/dist/module/hooks/useIsInPiPMode.js +19 -0
- package/dist/module/hooks/useIsInPiPMode.js.map +1 -0
- package/dist/module/hooks/usePaginatedLayoutSortPreset.js +19 -0
- package/dist/module/hooks/usePaginatedLayoutSortPreset.js.map +1 -0
- package/dist/module/icons/EndStreamIcon.js +12 -0
- package/dist/module/icons/EndStreamIcon.js.map +1 -0
- package/dist/module/icons/Eye.js +12 -0
- package/dist/module/icons/Eye.js.map +1 -0
- package/dist/module/icons/LeaveStreamIcon.js +12 -0
- package/dist/module/icons/LeaveStreamIcon.js.map +1 -0
- package/dist/module/icons/ShieldBadge.js +12 -0
- package/dist/module/icons/ShieldBadge.js.map +1 -0
- package/dist/module/icons/StartStreamIcon.js +12 -0
- package/dist/module/icons/StartStreamIcon.js.map +1 -0
- package/dist/module/icons/index.js +5 -0
- package/dist/module/icons/index.js.map +1 -1
- package/dist/module/providers/MediaStreamManagement.js +15 -2
- package/dist/module/providers/MediaStreamManagement.js.map +1 -1
- package/dist/module/theme/theme.js +70 -0
- package/dist/module/theme/theme.js.map +1 -1
- package/dist/module/translations/en.json +6 -1
- package/dist/module/utils/enterPiPAndroid.js +9 -0
- package/dist/module/utils/enterPiPAndroid.js.map +1 -0
- package/dist/module/utils/index.js +1 -0
- package/dist/module/utils/index.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/HostLivestream/HostLivestream.d.ts +30 -0
- package/dist/typescript/components/Livestream/HostLivestream/HostLivestream.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/HostLivestream/index.d.ts +2 -0
- package/dist/typescript/components/Livestream/HostLivestream/index.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamControls/HostLivestreamControls.d.ts +25 -0
- package/dist/typescript/components/Livestream/LivestreamControls/HostLivestreamControls.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts +25 -0
- package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamAudioControlButton.d.ts +6 -0
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamAudioControlButton.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamMediaControls.d.ts +10 -0
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamMediaControls.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamVideoControlButton.d.ts +6 -0
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamVideoControlButton.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.d.ts +16 -0
- package/dist/typescript/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamControls/ViewerLivestreamControls.d.ts +16 -0
- package/dist/typescript/components/Livestream/LivestreamControls/ViewerLivestreamControls.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamControls/index.d.ts +6 -0
- package/dist/typescript/components/Livestream/LivestreamControls/index.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamLayout/LivestreamLayout.d.ts +17 -0
- package/dist/typescript/components/Livestream/LivestreamLayout/LivestreamLayout.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamLayout/index.d.ts +2 -0
- package/dist/typescript/components/Livestream/LivestreamLayout/index.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/DurationBadge.d.ts +12 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/DurationBadge.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/FollowerCount.d.ts +10 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/FollowerCount.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/HostLivestreamTopView.d.ts +26 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/HostLivestreamTopView.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/LiveIndicator.d.ts +10 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/LiveIndicator.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.d.ts +26 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/index.d.ts +5 -0
- package/dist/typescript/components/Livestream/LivestreamTopView/index.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts +32 -0
- package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/ViewerLivestream/index.d.ts +2 -0
- package/dist/typescript/components/Livestream/ViewerLivestream/index.d.ts.map +1 -0
- package/dist/typescript/components/Livestream/index.d.ts +6 -0
- package/dist/typescript/components/Livestream/index.d.ts.map +1 -0
- package/dist/typescript/components/index.d.ts +1 -0
- package/dist/typescript/components/index.d.ts.map +1 -1
- package/dist/typescript/hooks/index.d.ts +2 -0
- package/dist/typescript/hooks/index.d.ts.map +1 -1
- package/dist/typescript/hooks/useAutoEnterPiPEffect.d.ts +2 -0
- package/dist/typescript/hooks/useAutoEnterPiPEffect.d.ts.map +1 -0
- package/dist/typescript/hooks/useIsInPiPMode.d.ts +2 -0
- package/dist/typescript/hooks/useIsInPiPMode.d.ts.map +1 -0
- package/dist/typescript/hooks/usePaginatedLayoutSortPreset.d.ts +3 -0
- package/dist/typescript/hooks/usePaginatedLayoutSortPreset.d.ts.map +1 -0
- package/dist/typescript/icons/EndStreamIcon.d.ts +3 -0
- package/dist/typescript/icons/EndStreamIcon.d.ts.map +1 -0
- package/dist/typescript/icons/Eye.d.ts +3 -0
- package/dist/typescript/icons/Eye.d.ts.map +1 -0
- package/dist/typescript/icons/LeaveStreamIcon.d.ts +3 -0
- package/dist/typescript/icons/LeaveStreamIcon.d.ts.map +1 -0
- package/dist/typescript/icons/ShieldBadge.d.ts +3 -0
- package/dist/typescript/icons/ShieldBadge.d.ts.map +1 -0
- package/dist/typescript/icons/StartStreamIcon.d.ts +3 -0
- package/dist/typescript/icons/StartStreamIcon.d.ts.map +1 -0
- package/dist/typescript/icons/index.d.ts +5 -0
- package/dist/typescript/icons/index.d.ts.map +1 -1
- package/dist/typescript/providers/MediaStreamManagement.d.ts.map +1 -1
- package/dist/typescript/theme/theme.d.ts +70 -0
- package/dist/typescript/theme/theme.d.ts.map +1 -1
- package/dist/typescript/translations/index.d.ts +6 -1
- package/dist/typescript/translations/index.d.ts.map +1 -1
- package/dist/typescript/utils/enterPiPAndroid.d.ts +2 -0
- package/dist/typescript/utils/enterPiPAndroid.d.ts.map +1 -0
- package/dist/typescript/utils/index.d.ts +1 -0
- package/dist/typescript/utils/index.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/expo-config-plugin/dist/common/addNewLinesToMainActivity.d.ts +1 -0
- package/expo-config-plugin/dist/common/addNewLinesToMainActivity.js +16 -0
- package/expo-config-plugin/dist/common/types.d.ts +4 -0
- package/expo-config-plugin/dist/index.js +6 -2
- package/expo-config-plugin/dist/withAndroidManifest.d.ts +2 -1
- package/expo-config-plugin/dist/withAndroidManifest.js +20 -2
- package/expo-config-plugin/dist/withMainActivity.d.ts +4 -0
- package/expo-config-plugin/dist/withMainActivity.js +72 -0
- package/package.json +1 -1
- package/src/components/Call/CallContent/CallContent.tsx +15 -7
- package/src/components/Call/CallLayout/CallParticipantsGrid.tsx +16 -2
- package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +4 -1
- package/src/components/Livestream/HostLivestream/HostLivestream.tsx +99 -0
- package/src/components/Livestream/HostLivestream/index.ts +1 -0
- package/src/components/Livestream/LivestreamControls/HostLivestreamControls.tsx +87 -0
- package/src/components/Livestream/LivestreamControls/HostStartStreamButton.tsx +163 -0
- package/src/components/Livestream/LivestreamControls/LivestreamAudioControlButton.tsx +78 -0
- package/src/components/Livestream/LivestreamControls/LivestreamMediaControls.tsx +32 -0
- package/src/components/Livestream/LivestreamControls/LivestreamVideoControlButton.tsx +78 -0
- package/src/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.tsx +102 -0
- package/src/components/Livestream/LivestreamControls/ViewerLivestreamControls.tsx +75 -0
- package/src/components/Livestream/LivestreamControls/index.ts +5 -0
- package/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx +77 -0
- package/src/components/Livestream/LivestreamLayout/index.ts +1 -0
- package/src/components/Livestream/LivestreamTopView/DurationBadge.tsx +170 -0
- package/src/components/Livestream/LivestreamTopView/FollowerCount.tsx +74 -0
- package/src/components/Livestream/LivestreamTopView/HostLivestreamTopView.tsx +105 -0
- package/src/components/Livestream/LivestreamTopView/LiveIndicator.tsx +53 -0
- package/src/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.tsx +102 -0
- package/src/components/Livestream/LivestreamTopView/index.ts +4 -0
- package/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx +126 -0
- package/src/components/Livestream/ViewerLivestream/index.ts +1 -0
- package/src/components/Livestream/index.ts +5 -0
- package/src/components/index.ts +1 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useAutoEnterPiPEffect.tsx +16 -0
- package/src/hooks/useIsInPiPMode.tsx +29 -0
- package/src/hooks/usePaginatedLayoutSortPreset.ts +27 -0
- package/src/icons/EndStreamIcon.tsx +13 -0
- package/src/icons/Eye.tsx +13 -0
- package/src/icons/LeaveStreamIcon.tsx +13 -0
- package/src/icons/ShieldBadge.tsx +13 -0
- package/src/icons/StartStreamIcon.tsx +13 -0
- package/src/icons/index.tsx +5 -0
- package/src/providers/MediaStreamManagement.tsx +14 -1
- package/src/theme/theme.ts +140 -0
- package/src/translations/en.json +6 -1
- package/src/utils/enterPiPAndroid.ts +11 -0
- package/src/utils/index.ts +1 -0
- package/src/version.ts +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.HostStartStreamButton = void 0;
|
|
7
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _contexts = require("../../../contexts");
|
|
11
|
+
var _icons = require("../../../icons");
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
/**
|
|
15
|
+
* Props for the HostStartStreamButton component.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The HostStartStreamButton component displays and controls the start and end of the host's live stream.
|
|
20
|
+
*/
|
|
21
|
+
const HostStartStreamButton = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
onEndStreamHandler,
|
|
24
|
+
onStartStreamHandler,
|
|
25
|
+
hls
|
|
26
|
+
} = _ref;
|
|
27
|
+
const [isAwaitingResponse, setIsAwaitingResponse] = (0, _react.useState)(false);
|
|
28
|
+
const {
|
|
29
|
+
useIsCallLive,
|
|
30
|
+
useIsCallBroadcastingInProgress
|
|
31
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
32
|
+
const {
|
|
33
|
+
theme: {
|
|
34
|
+
colors,
|
|
35
|
+
variants: {
|
|
36
|
+
iconSizes
|
|
37
|
+
},
|
|
38
|
+
typefaces,
|
|
39
|
+
hostStartStreamButton
|
|
40
|
+
}
|
|
41
|
+
} = (0, _contexts.useTheme)();
|
|
42
|
+
const call = (0, _videoReactBindings.useCall)();
|
|
43
|
+
const isCallLive = useIsCallLive();
|
|
44
|
+
const isCallBroadcasting = useIsCallBroadcastingInProgress();
|
|
45
|
+
const {
|
|
46
|
+
t
|
|
47
|
+
} = (0, _videoReactBindings.useI18n)();
|
|
48
|
+
const liveOrBroadcasting = isCallLive || isCallBroadcasting;
|
|
49
|
+
const onStartStreamButtonPress = async () => {
|
|
50
|
+
if (onStartStreamHandler) {
|
|
51
|
+
onStartStreamHandler();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
setIsAwaitingResponse(true);
|
|
56
|
+
await (call === null || call === void 0 ? void 0 : call.goLive());
|
|
57
|
+
if (hls) {
|
|
58
|
+
await (call === null || call === void 0 ? void 0 : call.startHLS());
|
|
59
|
+
}
|
|
60
|
+
setIsAwaitingResponse(false);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error('Error starting livestream', error);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const onEndStreamButtonPress = async () => {
|
|
66
|
+
if (onEndStreamHandler) {
|
|
67
|
+
onEndStreamHandler();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
setIsAwaitingResponse(true);
|
|
72
|
+
if (hls) {
|
|
73
|
+
await (call === null || call === void 0 ? void 0 : call.stopHLS());
|
|
74
|
+
} else {
|
|
75
|
+
await (call === null || call === void 0 ? void 0 : call.stopLive());
|
|
76
|
+
}
|
|
77
|
+
setIsAwaitingResponse(false);
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.error('Error stopping livestream', error);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
83
|
+
disabled: isAwaitingResponse,
|
|
84
|
+
style: [styles.container, {
|
|
85
|
+
backgroundColor: isAwaitingResponse ? colors.dark_gray : liveOrBroadcasting ? colors.error : colors.primary
|
|
86
|
+
}, hostStartStreamButton.container],
|
|
87
|
+
onPress: liveOrBroadcasting ? onEndStreamButtonPress : onStartStreamButtonPress
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
89
|
+
style: [styles.icon, {
|
|
90
|
+
height: iconSizes.xs,
|
|
91
|
+
width: iconSizes.xs
|
|
92
|
+
}, hostStartStreamButton.icon]
|
|
93
|
+
}, isAwaitingResponse ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, null) : liveOrBroadcasting ? /*#__PURE__*/_react.default.createElement(_icons.EndBroadcastIcon, null) : /*#__PURE__*/_react.default.createElement(_icons.StartStreamIcon, null)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
94
|
+
style: [styles.text, typefaces.subtitleBold, {
|
|
95
|
+
color: colors.static_white
|
|
96
|
+
}, hostStartStreamButton.text]
|
|
97
|
+
}, isAwaitingResponse ? t('Loading...') : liveOrBroadcasting ? t('Stop Livestream') : t('Start Livestream')));
|
|
98
|
+
};
|
|
99
|
+
exports.HostStartStreamButton = HostStartStreamButton;
|
|
100
|
+
const styles = _reactNative.StyleSheet.create({
|
|
101
|
+
container: {
|
|
102
|
+
flexDirection: 'row',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
padding: 8,
|
|
105
|
+
borderRadius: 4
|
|
106
|
+
},
|
|
107
|
+
icon: {},
|
|
108
|
+
text: {
|
|
109
|
+
marginLeft: 8,
|
|
110
|
+
includeFontPadding: false
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
//# sourceMappingURL=HostStartStreamButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_videoReactBindings","require","_react","_interopRequireWildcard","_reactNative","_contexts","_icons","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","HostStartStreamButton","_ref","onEndStreamHandler","onStartStreamHandler","hls","isAwaitingResponse","setIsAwaitingResponse","useState","useIsCallLive","useIsCallBroadcastingInProgress","useCallStateHooks","theme","colors","variants","iconSizes","typefaces","hostStartStreamButton","useTheme","useCall","isCallLive","isCallBroadcasting","t","useI18n","liveOrBroadcasting","onStartStreamButtonPress","goLive","startHLS","error","console","onEndStreamButtonPress","stopHLS","stopLive","createElement","Pressable","disabled","style","styles","container","backgroundColor","dark_gray","primary","onPress","View","icon","height","xs","width","ActivityIndicator","EndBroadcastIcon","StartStreamIcon","Text","text","subtitleBold","color","static_white","exports","StyleSheet","create","flexDirection","alignItems","padding","borderRadius","marginLeft","includeFontPadding"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamControls/HostStartStreamButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAAmE,SAAAM,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE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C,aAAA,CAACzD,YAAA,CAAA2E,IAAI;IACHf,KAAK,EAAE,CACLC,MAAM,CAACe,IAAI,EACXpC,SAAS,CAACqC,YAAY,EACtB;MAAEC,KAAK,EAAEzC,MAAM,CAAC0C;IAAa,CAAC,EAC9BtC,qBAAqB,CAACmC,IAAI;EAC1B,GAED9C,kBAAkB,GACfgB,CAAC,CAAC,YAAY,CAAC,GACfE,kBAAkB,GAClBF,CAAC,CAAC,iBAAiB,CAAC,GACpBA,CAAC,CAAC,kBAAkB,CACpB,CACG,CAAC;AAEhB,CAAC;AAACkC,OAAA,CAAAvD,qBAAA,GAAAA,qBAAA;AAEF,MAAMoC,MAAM,GAAGoB,uBAAU,CAACC,MAAM,CAAC;EAC/BpB,SAAS,EAAE;IACTqB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE;EAChB,CAAC;EACDlB,IAAI,EAAE,CAAC,CAAC;EACRQ,IAAI,EAAE;IACJW,UAAU,EAAE,CAAC;IACbC,kBAAkB,EAAE;EACtB;AACF,CAAC,CAAC"}
|
package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LivestreamAudioControlButton = void 0;
|
|
7
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _contexts = require("../../../contexts");
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _icons = require("../../../icons");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/**
|
|
14
|
+
* The LivestreamAudioControlButton controls the audio stream publish/unpublish while in the livestream for the host.
|
|
15
|
+
*/
|
|
16
|
+
const LivestreamAudioControlButton = () => {
|
|
17
|
+
const call = (0, _videoReactBindings.useCall)();
|
|
18
|
+
const {
|
|
19
|
+
useMicrophoneState
|
|
20
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
21
|
+
const {
|
|
22
|
+
status
|
|
23
|
+
} = useMicrophoneState();
|
|
24
|
+
const {
|
|
25
|
+
theme: {
|
|
26
|
+
colors,
|
|
27
|
+
variants: {
|
|
28
|
+
iconSizes,
|
|
29
|
+
buttonSizes
|
|
30
|
+
},
|
|
31
|
+
livestreamAudioControlButton
|
|
32
|
+
}
|
|
33
|
+
} = (0, _contexts.useTheme)();
|
|
34
|
+
const onPress = async () => {
|
|
35
|
+
await (call === null || call === void 0 ? void 0 : call.microphone.toggle());
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
38
|
+
onPress: onPress,
|
|
39
|
+
style: [styles.container, {
|
|
40
|
+
backgroundColor: colors.dark_gray,
|
|
41
|
+
height: buttonSizes.xs,
|
|
42
|
+
width: buttonSizes.xs
|
|
43
|
+
}, livestreamAudioControlButton.container]
|
|
44
|
+
}, status === 'enabled' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
45
|
+
style: [styles.icon, {
|
|
46
|
+
height: iconSizes.sm,
|
|
47
|
+
width: iconSizes.sm
|
|
48
|
+
}, livestreamAudioControlButton.icon]
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.Mic, {
|
|
50
|
+
color: colors.static_white
|
|
51
|
+
})) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
52
|
+
style: [styles.icon, {
|
|
53
|
+
height: iconSizes.sm,
|
|
54
|
+
width: iconSizes.sm
|
|
55
|
+
}, livestreamAudioControlButton.icon]
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.MicOff, {
|
|
57
|
+
color: colors.static_white
|
|
58
|
+
})));
|
|
59
|
+
};
|
|
60
|
+
exports.LivestreamAudioControlButton = LivestreamAudioControlButton;
|
|
61
|
+
const styles = _reactNative.StyleSheet.create({
|
|
62
|
+
container: {
|
|
63
|
+
justifyContent: 'center',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
marginHorizontal: 4,
|
|
66
|
+
borderRadius: 4
|
|
67
|
+
},
|
|
68
|
+
icon: {}
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=LivestreamAudioControlButton.js.map
|
package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_videoReactBindings","require","_react","_interopRequireDefault","_contexts","_reactNative","_icons","obj","__esModule","default","LivestreamAudioControlButton","call","useCall","useMicrophoneState","useCallStateHooks","status","theme","colors","variants","iconSizes","buttonSizes","livestreamAudioControlButton","useTheme","onPress","microphone","toggle","createElement","Pressable","style","styles","container","backgroundColor","dark_gray","height","xs","width","View","icon","sm","Mic","color","static_white","MicOff","exports","StyleSheet","create","justifyContent","alignItems","marginHorizontal","borderRadius"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamControls/LivestreamAudioControlButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAA6C,SAAAE,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE7C;AACA;AACA;AACO,MAAMG,4BAA4B,GAAGA,CAAA,KAAM;EAChD,MAAMC,IAAI,GAAG,IAAAC,2BAAO,EAAC,CAAC;EACtB,MAAM;IAAEC;EAAmB,CAAC,GAAG,IAAAC,qCAAiB,EAAC,CAAC;EAClD,MAAM;IAAEC;EAAO,CA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DjB,4BAA4B,CAACgB,IAAI;EACjC,gBAEFnC,MAAA,CAAAO,OAAA,CAAAiB,aAAA,CAACpB,MAAA,CAAAoC,MAAM;IAACF,KAAK,EAAEvB,MAAM,CAACwB;EAAa,CAAE,CACjC,CAEC,CAAC;AAEhB,CAAC;AAACE,OAAA,CAAAjC,4BAAA,GAAAA,4BAAA;AAEF,MAAMmB,MAAM,GAAGe,uBAAU,CAACC,MAAM,CAAC;EAC/Bf,SAAS,EAAE;IACTgB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,gBAAgB,EAAE,CAAC;IACnBC,YAAY,EAAE;EAChB,CAAC;EACDZ,IAAI,EAAE,CAAC;AACT,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LivestreamMediaControls = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _contexts = require("../../../contexts");
|
|
10
|
+
var _LivestreamAudioControlButton = require("./LivestreamAudioControlButton");
|
|
11
|
+
var _LivestreamVideoControlButton = require("./LivestreamVideoControlButton");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/**
|
|
14
|
+
* Props for the LivestreamMediaControls component.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The LivestreamMediaControls component controls the media publish/unpublish for the host's live stream.
|
|
19
|
+
*/
|
|
20
|
+
const LivestreamMediaControls = _ref => {
|
|
21
|
+
let {} = _ref;
|
|
22
|
+
const {
|
|
23
|
+
theme: {
|
|
24
|
+
livestreamMediaControls
|
|
25
|
+
}
|
|
26
|
+
} = (0, _contexts.useTheme)();
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
28
|
+
style: [styles.container, livestreamMediaControls.container]
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_LivestreamAudioControlButton.LivestreamAudioControlButton, null), /*#__PURE__*/_react.default.createElement(_LivestreamVideoControlButton.LivestreamVideoControlButton, null));
|
|
30
|
+
};
|
|
31
|
+
exports.LivestreamMediaControls = LivestreamMediaControls;
|
|
32
|
+
const styles = _reactNative.StyleSheet.create({
|
|
33
|
+
container: {
|
|
34
|
+
flexDirection: 'row',
|
|
35
|
+
alignItems: 'center'
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=LivestreamMediaControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_contexts","_LivestreamAudioControlButton","_LivestreamVideoControlButton","obj","__esModule","default","LivestreamMediaControls","_ref","theme","livestreamMediaControls","useTheme","createElement","View","style","styles","container","LivestreamAudioControlButton","LivestreamVideoControlButton","exports","StyleSheet","create","flexDirection","alignItems"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamControls/LivestreamMediaControls.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AACA,IAAAI,6BAAA,GAAAJ,OAAA;AAA8E,SAAAD,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9E;AACA;AACA;;AAGA;AACA;AACA;AACO,MAAMG,uBAAuB,GAAGC,IAAA,IAAsC;EAAA,IAArC,CAA+B,CAAC,GAAAA,IAAA;EACtE,MAAM;IACJC,KAAK,EAAE;MAAEC;IAAwB;EACnC,CAAC,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EACd,oBACEd,MAAA,CAAAS,OAAA,CAAAM,aAAA,CAACZ,YAAA,CAAAa,IAAI;IAACC,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAEN,uBAAuB,CAACM,SAAS;EAAE,gBACjEnB,MAAA,CAAAS,OAAA,CAAAM,aAAA,CAACV,6BAAA,CAAAe,4BAA4B,MAAE,CAAC,eAChCpB,MAAA,CAAAS,OAAA,CAAAM,aAAA,CAACT,6BAAA,CAAAe,4BAA4B,MAAE,CAC3B,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAZ,uBAAA,GAAAA,uBAAA;AAEF,MAAMQ,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LivestreamVideoControlButton = void 0;
|
|
7
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _contexts = require("../../../contexts");
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _icons = require("../../../icons");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/**
|
|
14
|
+
* The LivestreamVideoControlButton controls the video stream publish/unpublish while in the livestream for the host.
|
|
15
|
+
*/
|
|
16
|
+
const LivestreamVideoControlButton = () => {
|
|
17
|
+
const call = (0, _videoReactBindings.useCall)();
|
|
18
|
+
const {
|
|
19
|
+
useCameraState
|
|
20
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
21
|
+
const {
|
|
22
|
+
status
|
|
23
|
+
} = useCameraState();
|
|
24
|
+
const {
|
|
25
|
+
theme: {
|
|
26
|
+
colors,
|
|
27
|
+
variants: {
|
|
28
|
+
iconSizes,
|
|
29
|
+
buttonSizes
|
|
30
|
+
},
|
|
31
|
+
livestreamVideoControlButton
|
|
32
|
+
}
|
|
33
|
+
} = (0, _contexts.useTheme)();
|
|
34
|
+
const onPress = async () => {
|
|
35
|
+
await (call === null || call === void 0 ? void 0 : call.camera.toggle());
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
38
|
+
onPress: onPress,
|
|
39
|
+
style: [styles.container, {
|
|
40
|
+
backgroundColor: colors.dark_gray,
|
|
41
|
+
height: buttonSizes.xs,
|
|
42
|
+
width: buttonSizes.xs
|
|
43
|
+
}, livestreamVideoControlButton.container]
|
|
44
|
+
}, status === 'enabled' ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
45
|
+
style: [styles.icon, {
|
|
46
|
+
height: iconSizes.sm,
|
|
47
|
+
width: iconSizes.sm
|
|
48
|
+
}, livestreamVideoControlButton.icon]
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.Video, {
|
|
50
|
+
color: colors.static_white
|
|
51
|
+
})) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
52
|
+
style: [styles.icon, {
|
|
53
|
+
height: iconSizes.sm,
|
|
54
|
+
width: iconSizes.sm
|
|
55
|
+
}, livestreamVideoControlButton.icon]
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.VideoSlash, {
|
|
57
|
+
color: colors.static_white
|
|
58
|
+
})));
|
|
59
|
+
};
|
|
60
|
+
exports.LivestreamVideoControlButton = LivestreamVideoControlButton;
|
|
61
|
+
const styles = _reactNative.StyleSheet.create({
|
|
62
|
+
container: {
|
|
63
|
+
justifyContent: 'center',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
marginHorizontal: 4,
|
|
66
|
+
borderRadius: 4
|
|
67
|
+
},
|
|
68
|
+
icon: {}
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=LivestreamVideoControlButton.js.map
|
package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_videoReactBindings","require","_react","_interopRequireDefault","_contexts","_reactNative","_icons","obj","__esModule","default","LivestreamVideoControlButton","call","useCall","useCameraState","useCallStateHooks","status","theme","colors","variants","iconSizes","buttonSizes","livestreamVideoControlButton","useTheme","onPress","camera","toggle","createElement","Pressable","style","styles","container","backgroundColor","dark_gray","height","xs","width","View","icon","sm","Video","color","static_white","VideoSlash","exports","StyleSheet","create","justifyContent","alignItems","marginHorizontal","borderRadius"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamControls/LivestreamVideoControlButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAAmD,SAAAE,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnD;AACA;AACA;AACO,MAAMG,4BAA4B,GAAGA,CAAA,KAAM;EAChD,MAAMC,IAAI,GAAG,IAAAC,2BAAO,EAAC,CAAC;EACtB,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,qCAAiB,EAAC,CAAC;EAC9C,MAAM;IAAEC;EAAO,CAAC,GAAGF,cAAc,CAAC,CAAC;EACnC,MAAM;IACJG,KAAK,EAAE;MACLC,MAAM;MACNC,QAAQ,EAAE;QAAEC,SAAS;QAAEC;MAAY,CAAC;MACpCC;IACF;EACF,CAAC,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EAEd,MAAMC,OAAO,GAAG,MAAAA,CAA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AAA;AAEF,MAAMmB,MAAM,GAAGe,uBAAU,CAACC,MAAM,CAAC;EAC/Bf,SAAS,EAAE;IACTgB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,gBAAgB,EAAE,CAAC;IACnBC,YAAY,EAAE;EAChB,CAAC;EACDZ,IAAI,EAAE,CAAC;AACT,CAAC,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ViewerLeaveStreamButton = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _contexts = require("../../../contexts");
|
|
10
|
+
var _icons = require("../../../icons");
|
|
11
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
/**
|
|
15
|
+
* Props for the ViewerLeaveStreamButton component.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The ViewerLeaveStreamButton component displays and controls the leave stream logic of the viewer's live stream.
|
|
20
|
+
*/
|
|
21
|
+
const ViewerLeaveStreamButton = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
onLeaveStreamHandler
|
|
24
|
+
} = _ref;
|
|
25
|
+
const [isAwaitingResponse, setIsAwaitingResponse] = (0, _react.useState)(false);
|
|
26
|
+
const call = (0, _videoReactBindings.useCall)();
|
|
27
|
+
const {
|
|
28
|
+
t
|
|
29
|
+
} = (0, _videoReactBindings.useI18n)();
|
|
30
|
+
const {
|
|
31
|
+
theme: {
|
|
32
|
+
colors,
|
|
33
|
+
variants: {
|
|
34
|
+
iconSizes
|
|
35
|
+
},
|
|
36
|
+
typefaces,
|
|
37
|
+
viewerLeaveStreamButton
|
|
38
|
+
}
|
|
39
|
+
} = (0, _contexts.useTheme)();
|
|
40
|
+
const onLeaveStreamButtonPress = async () => {
|
|
41
|
+
if (onLeaveStreamHandler) {
|
|
42
|
+
onLeaveStreamHandler();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
setIsAwaitingResponse(true);
|
|
47
|
+
await (call === null || call === void 0 ? void 0 : call.leave());
|
|
48
|
+
setIsAwaitingResponse(false);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error('Error stopping livestream', error);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
54
|
+
style: [styles.container, {
|
|
55
|
+
backgroundColor: colors.dark_gray
|
|
56
|
+
}, viewerLeaveStreamButton.container],
|
|
57
|
+
onPress: onLeaveStreamButtonPress
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
59
|
+
style: [styles.icon, {
|
|
60
|
+
height: iconSizes.xs,
|
|
61
|
+
width: iconSizes.xs
|
|
62
|
+
}, viewerLeaveStreamButton.icon]
|
|
63
|
+
}, isAwaitingResponse ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, null) : /*#__PURE__*/_react.default.createElement(_icons.LeaveStreamIcon, null)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
64
|
+
style: [styles.text, typefaces.subtitleBold, {
|
|
65
|
+
color: colors.static_white
|
|
66
|
+
}, viewerLeaveStreamButton.text]
|
|
67
|
+
}, isAwaitingResponse ? t('Loading...') : t('Leave Stream')));
|
|
68
|
+
};
|
|
69
|
+
exports.ViewerLeaveStreamButton = ViewerLeaveStreamButton;
|
|
70
|
+
const styles = _reactNative.StyleSheet.create({
|
|
71
|
+
container: {
|
|
72
|
+
flexDirection: 'row',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
padding: 8,
|
|
75
|
+
borderRadius: 4
|
|
76
|
+
},
|
|
77
|
+
icon: {},
|
|
78
|
+
text: {
|
|
79
|
+
marginLeft: 8,
|
|
80
|
+
includeFontPadding: false
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=ViewerLeaveStreamButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_contexts","_icons","_videoReactBindings","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ViewerLeaveStreamButton","_ref","onLeaveStreamHandler","isAwaitingResponse","setIsAwaitingResponse","useState","useCall","t","useI18n","theme","colors","variants","iconSizes","typefaces","viewerLeaveStreamButton","useTheme","onLeaveStreamButtonPress","leave","error","console","createElement","Pressable","style","styles","container","backgroundColor","dark_gray","onPress","View","icon","height","xs","width","ActivityIndicator","LeaveStreamIcon","Text","text","subtitleBold","color","static_white","exports","StyleSheet","create","flexDirection","alignItems","padding","border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|
+
exports.ViewerLivestreamControls = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _ViewerLeaveStreamButton = require("./ViewerLeaveStreamButton");
|
|
10
|
+
var _contexts = require("../../../contexts");
|
|
11
|
+
var _constants = require("../../../constants");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/**
|
|
14
|
+
* Props for the ViewerLivestreamControls component.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The ViewerLivestreamControls component displays the call controls for the live stream at viewer's end.
|
|
19
|
+
*/
|
|
20
|
+
const ViewerLivestreamControls = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
ViewerLeaveStreamButton = _ViewerLeaveStreamButton.ViewerLeaveStreamButton,
|
|
23
|
+
onLeaveStreamHandler
|
|
24
|
+
} = _ref;
|
|
25
|
+
const {
|
|
26
|
+
theme: {
|
|
27
|
+
colors,
|
|
28
|
+
viewerLivestreamControls
|
|
29
|
+
}
|
|
30
|
+
} = (0, _contexts.useTheme)();
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
32
|
+
style: [styles.container, {
|
|
33
|
+
backgroundColor: colors.static_overlay
|
|
34
|
+
}, viewerLivestreamControls.container]
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
36
|
+
style: [styles.leftElement, viewerLivestreamControls.leftElement]
|
|
37
|
+
}, ViewerLeaveStreamButton && /*#__PURE__*/_react.default.createElement(ViewerLeaveStreamButton, {
|
|
38
|
+
onLeaveStreamHandler: onLeaveStreamHandler
|
|
39
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
40
|
+
style: [styles.rightElement, viewerLivestreamControls.rightElement]
|
|
41
|
+
}));
|
|
42
|
+
};
|
|
43
|
+
exports.ViewerLivestreamControls = ViewerLivestreamControls;
|
|
44
|
+
const styles = _reactNative.StyleSheet.create({
|
|
45
|
+
container: {
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
bottom: 0,
|
|
48
|
+
flexDirection: 'row',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
paddingVertical: 16,
|
|
51
|
+
paddingHorizontal: 8,
|
|
52
|
+
zIndex: _constants.Z_INDEX.IN_FRONT
|
|
53
|
+
},
|
|
54
|
+
content: {},
|
|
55
|
+
leftElement: {
|
|
56
|
+
flex: 1,
|
|
57
|
+
alignItems: 'flex-start'
|
|
58
|
+
},
|
|
59
|
+
rightElement: {
|
|
60
|
+
flex: 1,
|
|
61
|
+
alignItems: 'flex-end'
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=ViewerLivestreamControls.js.map
|
package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ViewerLeaveStreamButton","_contexts","_constants","obj","__esModule","default","ViewerLivestreamControls","_ref","ViewerLeaveStreamButton","DefaultViewerLeaveStreamButton","onLeaveStreamHandler","theme","colors","viewerLivestreamControls","useTheme","createElement","View","style","styles","container","backgroundColor","static_overlay","leftElement","rightElement","exports","StyleSheet","create","position","bottom","flexDirection","alignItems","paddingVertical","paddingHorizontal","zIndex","Z_INDEX","IN_FRONT","content","flex"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamControls/ViewerLivestreamControls.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AAIA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAA6C,SAAAD,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAA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,OAAO,EAAE,CAAC,CAAC;EACXd,WAAW,EAAE;IACXe,IAAI,EAAE,CAAC;IACPP,UAAU,EAAE;EACd,CAAC;EACDP,YAAY,EAAE;IACZc,IAAI,EAAE,CAAC;IACPP,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _HostLivestreamControls = require("./HostLivestreamControls");
|
|
7
|
+
Object.keys(_HostLivestreamControls).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _HostLivestreamControls[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _HostLivestreamControls[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _LivestreamMediaControls = require("./LivestreamMediaControls");
|
|
18
|
+
Object.keys(_LivestreamMediaControls).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _LivestreamMediaControls[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _LivestreamMediaControls[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _HostStartStreamButton = require("./HostStartStreamButton");
|
|
29
|
+
Object.keys(_HostStartStreamButton).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _HostStartStreamButton[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _HostStartStreamButton[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _LivestreamAudioControlButton = require("./LivestreamAudioControlButton");
|
|
40
|
+
Object.keys(_LivestreamAudioControlButton).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _LivestreamAudioControlButton[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _LivestreamAudioControlButton[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _LivestreamVideoControlButton = require("./LivestreamVideoControlButton");
|
|
51
|
+
Object.keys(_LivestreamVideoControlButton).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _LivestreamVideoControlButton[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _LivestreamVideoControlButton[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_HostLivestreamControls","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_LivestreamMediaControls","_HostStartStreamButton","_LivestreamAudioControlButton","_LivestreamVideoControlButton"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamControls/index.ts"],"mappings":";;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,uBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,uBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG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AC,IAAA,CAAAU,6BAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,6BAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,6BAAA,CAAAR,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LivestreamLayout = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _videoClient = require("@stream-io/video-client");
|
|
9
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _usePaginatedLayoutSortPreset = require("../../../hooks/usePaginatedLayoutSortPreset");
|
|
12
|
+
var _contexts = require("../../../contexts");
|
|
13
|
+
var _Participant = require("../../Participant");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
/**
|
|
16
|
+
* Props for the LivestreamLayout component.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const hasScreenShare = p => p === null || p === void 0 ? void 0 : p.publishedTracks.includes(_videoClient.SfuModels.TrackType.SCREEN_SHARE);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The LivestreamLayout component presents the live stream video layout.
|
|
23
|
+
*/
|
|
24
|
+
const LivestreamLayout = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
landscape,
|
|
27
|
+
VideoRenderer = _Participant.VideoRenderer
|
|
28
|
+
} = _ref;
|
|
29
|
+
const {
|
|
30
|
+
useParticipants,
|
|
31
|
+
useHasOngoingScreenShare
|
|
32
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
33
|
+
const call = (0, _videoReactBindings.useCall)();
|
|
34
|
+
const {
|
|
35
|
+
theme: {
|
|
36
|
+
colors,
|
|
37
|
+
livestreamLayout
|
|
38
|
+
}
|
|
39
|
+
} = (0, _contexts.useTheme)();
|
|
40
|
+
const [currentSpeaker, ...otherParticipants] = useParticipants();
|
|
41
|
+
const hasOngoingScreenShare = useHasOngoingScreenShare();
|
|
42
|
+
const presenter = hasOngoingScreenShare ? hasScreenShare(currentSpeaker) && currentSpeaker : otherParticipants.find(hasScreenShare);
|
|
43
|
+
(0, _usePaginatedLayoutSortPreset.usePaginatedLayoutSortPreset)(call);
|
|
44
|
+
const landScapeStyles = {
|
|
45
|
+
flexDirection: landscape ? 'row' : 'column'
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
48
|
+
style: [styles.container, landScapeStyles, {
|
|
49
|
+
backgroundColor: colors.dark_gray
|
|
50
|
+
}, livestreamLayout.container]
|
|
51
|
+
}, VideoRenderer && hasOngoingScreenShare && presenter && /*#__PURE__*/_react.default.createElement(VideoRenderer, {
|
|
52
|
+
trackType: "screenShareTrack",
|
|
53
|
+
participant: presenter
|
|
54
|
+
}), VideoRenderer && !hasOngoingScreenShare && currentSpeaker && /*#__PURE__*/_react.default.createElement(VideoRenderer, {
|
|
55
|
+
participant: currentSpeaker,
|
|
56
|
+
trackType: "videoTrack"
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
exports.LivestreamLayout = LivestreamLayout;
|
|
60
|
+
const styles = _reactNative.StyleSheet.create({
|
|
61
|
+
container: {
|
|
62
|
+
flex: 1
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=LivestreamLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_videoClient","_videoReactBindings","_reactNative","_usePaginatedLayoutSortPreset","_contexts","_Participant","obj","__esModule","default","hasScreenShare","p","publishedTracks","includes","SfuModels","TrackType","SCREEN_SHARE","LivestreamLayout","_ref","landscape","VideoRenderer","DefaultVideoRenderer","useParticipants","useHasOngoingScreenShare","useCallStateHooks","call","useCall","theme","colors","livestreamLayout","useTheme","currentSpeaker","otherParticipants","hasOngoingScreenShare","presenter","find","usePaginatedLayoutSortPreset","landScapeStyles","flexDirection","createElement","View","style","styles","container","backgroundColor","dark_gray","trackType","participant","exports","StyleSheet","create","flex"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamLayout/LivestreamLayout.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,6BAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAG2B,SAAAD,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE3B;AACA;AACA;;AAaA,MAAMG,cAAc,GAAIC,CAA0B,IAChDA,CAAC,aAADA,CAAC,uBAADA,CAAC,CAAEC,eAAe,CAACC,QAAQ,CAACC,sBAAS,CAACC,SAAS,CAACC,YAAY,CAAC;;AAE/D;AACA;AACA;AACO,MAAMC,gBAAgB,GAAGC,IAAA,IAGH;EAAA,IAHI;IAC/BC,SAAS;IACTC,aAAa,GAAGC;EACK,CAAC,GAAAH,IAAA;EACtB,MAAM;IAAEI,eAAe;IAAEC;EAAyB,CAAC,GAAG,IAAAC,qCAAiB,EAAC,CAAC;EACzE,MAAMC,IAAI,GAAG,IAAAC,2BAAO,EAAC,CAAC;EACtB,MAAM;IACJC,KAAK,EAAE;MAAEC,MAAM;MAAEC;IAA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