@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,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _LivestreamLayout = require("./LivestreamLayout");
|
|
7
|
+
Object.keys(_LivestreamLayout).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _LivestreamLayout[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _LivestreamLayout[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_LivestreamLayout","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamLayout/index.ts"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,iBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,iBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DurationBadge = 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 HostDurationBadge component.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The HostDurationBadge component displays the duration while the live stream is active.
|
|
20
|
+
*/
|
|
21
|
+
const DurationBadge = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
mode
|
|
24
|
+
} = _ref;
|
|
25
|
+
const {
|
|
26
|
+
useCallSession
|
|
27
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
28
|
+
const session = useCallSession();
|
|
29
|
+
const [duration, setDuration] = (0, _react.useState)(() => {
|
|
30
|
+
if (!session || !session.live_started_at) {
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
33
|
+
const liveStartTime = new Date(session.live_started_at);
|
|
34
|
+
const now = new Date();
|
|
35
|
+
return Math.floor((now.getTime() - liveStartTime.getTime()) / 1000);
|
|
36
|
+
});
|
|
37
|
+
const call = (0, _videoReactBindings.useCall)();
|
|
38
|
+
const {
|
|
39
|
+
theme: {
|
|
40
|
+
colors,
|
|
41
|
+
variants: {
|
|
42
|
+
iconSizes
|
|
43
|
+
},
|
|
44
|
+
durationBadge
|
|
45
|
+
}
|
|
46
|
+
} = (0, _contexts.useTheme)();
|
|
47
|
+
|
|
48
|
+
// for host
|
|
49
|
+
(0, _react.useEffect)(() => {
|
|
50
|
+
if (mode !== 'host') {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
let intervalId;
|
|
54
|
+
const handleLiveStarted = () => {
|
|
55
|
+
intervalId = setInterval(() => {
|
|
56
|
+
setDuration(d => d + 1);
|
|
57
|
+
}, 1000);
|
|
58
|
+
};
|
|
59
|
+
const handleLiveEnded = event => {
|
|
60
|
+
const callDetails = event.call.session;
|
|
61
|
+
if ((callDetails === null || callDetails === void 0 ? void 0 : callDetails.live_ended_at) !== null) {
|
|
62
|
+
clearInterval(intervalId);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const callLiveStartedUnsubscribe = call === null || call === void 0 ? void 0 : call.on('call.live_started', handleLiveStarted);
|
|
66
|
+
const callUpdatedUnsubscribe = call === null || call === void 0 ? void 0 : call.on('call.updated', handleLiveEnded);
|
|
67
|
+
return () => {
|
|
68
|
+
if (mode !== 'host') {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (callLiveStartedUnsubscribe && callUpdatedUnsubscribe) {
|
|
72
|
+
callLiveStartedUnsubscribe();
|
|
73
|
+
callUpdatedUnsubscribe();
|
|
74
|
+
}
|
|
75
|
+
if (intervalId) {
|
|
76
|
+
clearInterval(intervalId);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}, [call, mode]);
|
|
80
|
+
|
|
81
|
+
// for viewer
|
|
82
|
+
(0, _react.useEffect)(() => {
|
|
83
|
+
if (mode !== 'viewer') {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
let intervalId;
|
|
87
|
+
const handleLiveStarted = () => {
|
|
88
|
+
intervalId = setInterval(() => {
|
|
89
|
+
setDuration(d => d + 1);
|
|
90
|
+
}, 1000);
|
|
91
|
+
};
|
|
92
|
+
handleLiveStarted();
|
|
93
|
+
return () => {
|
|
94
|
+
if (mode !== 'viewer') {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (intervalId) {
|
|
98
|
+
clearInterval(intervalId);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}, [mode]);
|
|
102
|
+
const formatDuration = durationInMs => {
|
|
103
|
+
const days = Math.floor(durationInMs / 86400);
|
|
104
|
+
const hours = Math.floor(durationInMs / 3600);
|
|
105
|
+
const minutes = Math.floor(durationInMs % 3600 / 60);
|
|
106
|
+
const seconds = durationInMs % 60;
|
|
107
|
+
return `${days ? days + ' ' : ''}${hours ? hours + ':' : ''}${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
|
|
108
|
+
};
|
|
109
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
110
|
+
style: [styles.container, {
|
|
111
|
+
backgroundColor: colors.dark_gray
|
|
112
|
+
}, durationBadge.container]
|
|
113
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
114
|
+
style: [styles.icon, {
|
|
115
|
+
height: iconSizes.xs,
|
|
116
|
+
width: iconSizes.xs
|
|
117
|
+
}, durationBadge.icon]
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.ShieldBadge, null)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
119
|
+
style: [styles.label, {
|
|
120
|
+
color: colors.static_white
|
|
121
|
+
}, durationBadge.label]
|
|
122
|
+
}, formatDuration(duration)));
|
|
123
|
+
};
|
|
124
|
+
exports.DurationBadge = DurationBadge;
|
|
125
|
+
const styles = _reactNative.StyleSheet.create({
|
|
126
|
+
container: {
|
|
127
|
+
paddingHorizontal: 8,
|
|
128
|
+
paddingVertical: 4,
|
|
129
|
+
borderRadius: 4,
|
|
130
|
+
flexDirection: 'row',
|
|
131
|
+
alignItems: 'center',
|
|
132
|
+
justifyContent: 'center'
|
|
133
|
+
},
|
|
134
|
+
icon: {},
|
|
135
|
+
label: {
|
|
136
|
+
textAlign: 'center',
|
|
137
|
+
fontSize: 13,
|
|
138
|
+
fontWeight: '400',
|
|
139
|
+
flexShrink: 1,
|
|
140
|
+
includeFontPadding: false,
|
|
141
|
+
paddingLeft: 4
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
//# sourceMappingURL=DurationBadge.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","DurationBadge","_ref","mode","useCallSession","useCallStateHooks","session","duration","setDuration","useState","live_started_at","liveStartTime","Date","now","Math","floor","getTime","useCall","theme","colors","variants","iconSizes","durationBadge","useTheme","useEffect","intervalId","handleLiveStarted","setInterval","d","handleLiveEnded","event","callDetails","live_ended_at","clearInterval","callLiveStartedUnsubscribe","on","callUpdatedUnsubscribe","formatDuration","durationInMs","days","hours","minutes","seconds","createElement","View","style","styles","container","backgroundColor","dark_gray","icon","height","xs","width","ShieldBadge","Text","label","color","static_white","exports","StyleSheet","create","paddingHorizontal","paddingVertical","borderRadius","flexDirection","alignItems","justifyContent","textAlign","fontSize","fontWeight","flexShrink","includeFontPadding","paddingLeft"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamTopView/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,KAAK,EACZ;MAAEC,KAAK,EAAEtC,MAAM,CAACuC;IAAa,CAAC,EAC9BpC,aAAa,CAACkC,KAAK;EACnB,GAEDnB,cAAc,CAAC9B,QAAQ,CACpB,CACF,CAAC;AAEX,CAAC;AAACoD,OAAA,CAAA1D,aAAA,GAAAA,aAAA;AAEF,MAAM6C,MAAM,GAAGc,uBAAU,CAACC,MAAM,CAAC;EAC/Bd,SAAS,EAAE;IACTe,iBAAiB,EAAE,CAAC;IACpBC,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE,CAAC;IACfC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDjB,IAAI,EAAE,CAAC,CAAC;EACRM,KAAK,EAAE;IACLY,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE,CAAC;IACbC,kBAAkB,EAAE,KAAK;IACzBC,WAAW,EAAE;EACf;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FollowerCount = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _contexts = require("../../../contexts");
|
|
10
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
11
|
+
var _icons = require("../../../icons");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
/**
|
|
14
|
+
* Props for the FollowerCount component.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The FollowerCount component that displays the number of participants while in the call.
|
|
19
|
+
*/
|
|
20
|
+
const FollowerCount = _ref => {
|
|
21
|
+
let {} = _ref;
|
|
22
|
+
const {
|
|
23
|
+
theme: {
|
|
24
|
+
colors,
|
|
25
|
+
variants: {
|
|
26
|
+
iconSizes
|
|
27
|
+
},
|
|
28
|
+
followerCount
|
|
29
|
+
}
|
|
30
|
+
} = (0, _contexts.useTheme)();
|
|
31
|
+
const {
|
|
32
|
+
useParticipantCount
|
|
33
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
34
|
+
const totalParticipants = useParticipantCount();
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
36
|
+
style: [styles.container, {
|
|
37
|
+
backgroundColor: colors.dark_gray
|
|
38
|
+
}, followerCount.container]
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
40
|
+
style: [styles.icon, {
|
|
41
|
+
height: iconSizes.xs,
|
|
42
|
+
width: iconSizes.xs
|
|
43
|
+
}, followerCount.icon]
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.Eye, null)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
45
|
+
style: [styles.label, {
|
|
46
|
+
color: colors.static_white
|
|
47
|
+
}, followerCount.label]
|
|
48
|
+
}, totalParticipants));
|
|
49
|
+
};
|
|
50
|
+
exports.FollowerCount = FollowerCount;
|
|
51
|
+
const styles = _reactNative.StyleSheet.create({
|
|
52
|
+
container: {
|
|
53
|
+
paddingHorizontal: 8,
|
|
54
|
+
paddingVertical: 4,
|
|
55
|
+
borderTopRightRadius: 4,
|
|
56
|
+
borderBottomRightRadius: 4,
|
|
57
|
+
flexDirection: 'row',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
justifyContent: 'center'
|
|
60
|
+
},
|
|
61
|
+
icon: {},
|
|
62
|
+
label: {
|
|
63
|
+
fontSize: 13,
|
|
64
|
+
fontWeight: '400',
|
|
65
|
+
flexShrink: 1,
|
|
66
|
+
textAlign: 'center',
|
|
67
|
+
includeFontPadding: false,
|
|
68
|
+
marginLeft: 4
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=FollowerCount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_contexts","_videoReactBindings","_icons","obj","__esModule","default","FollowerCount","_ref","theme","colors","variants","iconSizes","followerCount","useTheme","useParticipantCount","useCallStateHooks","totalParticipants","createElement","View","style","styles","container","backgroundColor","dark_gray","icon","height","xs","width","Eye","Text","label","color","static_white","exports","StyleSheet","create","paddingHorizontal","paddingVertical","borderTopRightRadius","borderBottomRightRadius","flexDirection","alignItems","justifyContent","fontSize","fontWeight","flexShrink","textAlign","includeFontPadding","marginLeft"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamTopView/FollowerCount.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAqC,SAAAD,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAErC;AACA;AACA;;AAGA;AACA;AACA;AACO,MAAMG,aAAa,GAAGC,IAAA,IAA4B;EAAA,IAA3B,CAAqB,CAAC,GAAAA,IAAA;EAClD,MAAM;IACJC,KAAK,EAAE;MACLC,MAAM;MACNC,QAAQ,EAAE;QAAEC;MAAU,CAAC;MACvBC;IACF;EACF,CAAC,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EACd,MAAM;IAAEC;EAAoB,CAAC,GAAG,IAAAC,qCAAiB,EAAC,CAAC;EACnD,MAAMC,iBAAiB,GAAGF,mBAAmB,CAAC,CAAC;EAC/C,oBACElB,MAAA,CAAAS,OAAA,CAAAY,aAAA,CAAClB,YAAA,CAAAmB,IAAI;IACHC,KAAK,EAAE,CACLC,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|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.HostLivestreamTopView = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _DurationBadge = require("./DurationBadge");
|
|
10
|
+
var _LiveIndicator = require("./LiveIndicator");
|
|
11
|
+
var _FollowerCount = require("./FollowerCount");
|
|
12
|
+
var _contexts = require("../../../contexts");
|
|
13
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
14
|
+
var _constants = require("../../../constants");
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
/**
|
|
17
|
+
* Props for the HostLivestreamTopView component.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The HostLivestreamTopView component displays the top view component of the host's live stream.
|
|
22
|
+
*/
|
|
23
|
+
const HostLivestreamTopView = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
DurationBadge = _DurationBadge.DurationBadge,
|
|
26
|
+
LiveIndicator = _LiveIndicator.LiveIndicator,
|
|
27
|
+
FollowerCount = _FollowerCount.FollowerCount
|
|
28
|
+
} = _ref;
|
|
29
|
+
const {
|
|
30
|
+
useIsCallLive,
|
|
31
|
+
useIsCallBroadcastingInProgress
|
|
32
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
33
|
+
const isCallLive = useIsCallLive();
|
|
34
|
+
const isBroadcasting = useIsCallBroadcastingInProgress();
|
|
35
|
+
const liveOrBroadcasting = isCallLive || isBroadcasting;
|
|
36
|
+
const {
|
|
37
|
+
theme: {
|
|
38
|
+
colors,
|
|
39
|
+
hostLivestreamTopView
|
|
40
|
+
}
|
|
41
|
+
} = (0, _contexts.useTheme)();
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
43
|
+
style: [styles.container, {
|
|
44
|
+
backgroundColor: colors.static_overlay
|
|
45
|
+
}, hostLivestreamTopView.container]
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
47
|
+
style: [styles.leftElement, hostLivestreamTopView.leftElement]
|
|
48
|
+
}, DurationBadge && /*#__PURE__*/_react.default.createElement(DurationBadge, {
|
|
49
|
+
mode: "host"
|
|
50
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
51
|
+
style: [styles.centerElement, hostLivestreamTopView.centerElement]
|
|
52
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
53
|
+
style: [styles.rightElement, hostLivestreamTopView.rightElement]
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
55
|
+
style: [styles.liveInfo, hostLivestreamTopView.liveInfo]
|
|
56
|
+
}, liveOrBroadcasting && LiveIndicator && /*#__PURE__*/_react.default.createElement(LiveIndicator, null), FollowerCount && /*#__PURE__*/_react.default.createElement(FollowerCount, null))));
|
|
57
|
+
};
|
|
58
|
+
exports.HostLivestreamTopView = HostLivestreamTopView;
|
|
59
|
+
const styles = _reactNative.StyleSheet.create({
|
|
60
|
+
container: {
|
|
61
|
+
position: 'absolute',
|
|
62
|
+
top: 0,
|
|
63
|
+
flexDirection: 'row',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
paddingVertical: 16,
|
|
66
|
+
paddingHorizontal: 8,
|
|
67
|
+
borderBottomEndRadius: 8,
|
|
68
|
+
borderBottomStartRadius: 8,
|
|
69
|
+
zIndex: _constants.Z_INDEX.IN_FRONT
|
|
70
|
+
},
|
|
71
|
+
liveInfo: {
|
|
72
|
+
flexDirection: 'row'
|
|
73
|
+
},
|
|
74
|
+
leftElement: {
|
|
75
|
+
flex: 1,
|
|
76
|
+
alignItems: 'flex-start'
|
|
77
|
+
},
|
|
78
|
+
centerElement: {
|
|
79
|
+
flex: 1,
|
|
80
|
+
alignItems: 'center'
|
|
81
|
+
},
|
|
82
|
+
rightElement: {
|
|
83
|
+
flex: 1,
|
|
84
|
+
alignItems: 'flex-end'
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=HostLivestreamTopView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_DurationBadge","_LiveIndicator","_FollowerCount","_contexts","_videoReactBindings","_constants","obj","__esModule","default","HostLivestreamTopView","_ref","DurationBadge","DefaultDurationBadge","LiveIndicator","DefaultLiveIndicator","FollowerCount","DefaultFollowerCount","useIsCallLive","useIsCallBroadcastingInProgress","useCallStateHooks","isCallLive","isBroadcasting","liveOrBroadcasting","theme","colors","hostLivestreamTopView","useTheme","createElement","View","style","styles","container","backgroundColor","static_overlay","leftElement","mode","centerElement","rightElement","liveInfo","exports","StyleSheet","create","position","top","flexDirection","alignItems","paddingVertical","paddingHorizontal","borderBottomEndRadius","borderBottomStartRadius","zIndex","Z_INDEX","IN_FRONT","flex"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamTopView/HostLivestreamTopView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAIA,IAAAG,cAAA,GAAAH,OAAA;AAIA,IAAAI,cAAA,GAAAJ,OAAA;AAIA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAA6C,SAAAD,uBAAAS,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE7C;AACA;AACA;;AAgBA;AACA;AACA;AACO,MAAMG,qBAAqB,GAAGC,IAAA,IAIH;EAAA,IAJI;IACpCC,aAAa,GAAGC,4BAAoB;IACpCC,aAAa,GAAGC,4BAAoB;IACpCC,aAAa,G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QAAQ,EAAEb,qBAAqB,CAACa,QAAQ;EAAE,GAC5DhB,kBAAkB,IAAIT,aAAa,iBAAIjB,MAAA,CAAAY,OAAA,CAAAmB,aAAA,CAACd,aAAa,MAAE,CAAC,EACxDE,aAAa,iBAAInB,MAAA,CAAAY,OAAA,CAAAmB,aAAA,CAACZ,aAAa,MAAE,CAC9B,CACF,CACF,CAAC;AAEX,CAAC;AAACwB,OAAA,CAAA9B,qBAAA,GAAAA,qBAAA;AAEF,MAAMqB,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,CAAC;IACpBC,qBAAqB,EAAE,CAAC;IACxBC,uBAAuB,EAAE,CAAC;IAC1BC,MAAM,EAAEC,kBAAO,CAACC;EAClB,CAAC;EACDd,QAAQ,EAAE;IACRM,aAAa,EAAE;EACjB,CAAC;EACDV,WAAW,EAAE;IACXmB,IAAI,EAAE,CAAC;IACPR,UAAU,EAAE;EACd,CAAC;EACDT,aAAa,EAAE;IACbiB,IAAI,EAAE,CAAC;IACPR,UAAU,EAAE;EACd,CAAC;EACDR,YAAY,EAAE;IACZgB,IAAI,EAAE,CAAC;IACPR,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LiveIndicator = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _contexts = require("../../../contexts");
|
|
10
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
/**
|
|
13
|
+
* Props for the LiveIndicator component.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The LiveIndicator component displays whether the live stream is live or not.
|
|
18
|
+
*/
|
|
19
|
+
const LiveIndicator = _ref => {
|
|
20
|
+
let {} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
theme: {
|
|
23
|
+
colors,
|
|
24
|
+
typefaces,
|
|
25
|
+
liveIndicator
|
|
26
|
+
}
|
|
27
|
+
} = (0, _contexts.useTheme)();
|
|
28
|
+
const {
|
|
29
|
+
t
|
|
30
|
+
} = (0, _videoReactBindings.useI18n)();
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
32
|
+
style: [styles.container, {
|
|
33
|
+
backgroundColor: colors.primary
|
|
34
|
+
}, liveIndicator.container]
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
36
|
+
style: [styles.label, {
|
|
37
|
+
color: colors.static_white
|
|
38
|
+
}, typefaces.subtitleBold, liveIndicator.label]
|
|
39
|
+
}, t('Live')));
|
|
40
|
+
};
|
|
41
|
+
exports.LiveIndicator = LiveIndicator;
|
|
42
|
+
const styles = _reactNative.StyleSheet.create({
|
|
43
|
+
container: {
|
|
44
|
+
paddingHorizontal: 8,
|
|
45
|
+
paddingVertical: 4,
|
|
46
|
+
borderTopLeftRadius: 4,
|
|
47
|
+
borderBottomLeftRadius: 4,
|
|
48
|
+
justifyContent: 'center'
|
|
49
|
+
},
|
|
50
|
+
label: {
|
|
51
|
+
textAlign: 'center',
|
|
52
|
+
includeFontPadding: false
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=LiveIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_contexts","_videoReactBindings","obj","__esModule","default","LiveIndicator","_ref","theme","colors","typefaces","liveIndicator","useTheme","t","useI18n","createElement","View","style","styles","container","backgroundColor","primary","Text","label","color","static_white","subtitleBold","exports","StyleSheet","create","paddingHorizontal","paddingVertical","borderTopLeftRadius","borderBottomLeftRadius","justifyContent","textAlign","includeFontPadding"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamTopView/LiveIndicator.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAA0D,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE1D;AACA;AACA;;AAGA;AACA;AACA;AACO,MAAMG,aAAa,GAAGC,IAAA,IAA4B;EAAA,IAA3B,CAAqB,CAAC,GAAAA,IAAA;EAClD,MAAM;IACJC,KAAK,EAAE;MAAEC,MAAM;MAAEC,SAAS;MAAEC;IAAc;EAC5C,CAAC,GAAG,IAAAC,kBAAQ,EAAC,CAAC;EACd,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,2BAAO,EAAC,CAAC;EACvB,oBACEjB,MAAA,CAAAQ,OAAA,CAAAU,aAAA,CAACf,YAAA,CAAAgB,IAAI;IACHC,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MAAEC,eAAe,EAAEX,MAAM,CAACY;IAAQ,CAAC,EACnCV,aAAa,CAACQ,SAAS;EACvB,gBAEFtB,MAAA,CAAAQ,OAAA,CAAAU,aAAA,CAACf,YAAA,CAAAsB,IAAI;IACHL,KAAK,EAAE,CACLC,MAAM,CAACK,KAAK,EACZ;MAAEC,KAAK,EAAEf,MAAM,CAACgB;IAAa,CAAC,EAC9Bf,SAAS,CAACgB,YAAY,EACtBf,aAAa,CAACY,KAAK;EACnB,GAEDV,CAAC,CAAC,MAAM,CACL,CACF,CAAC;AAEX,CAAC;AAACc,OAAA,CAAArB,aAAA,GAAAA,aAAA;AAEF,MAAMY,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,iBAAiB,EAAE,CAAC;IACpBC,eAAe,EAAE,CAAC;IAClBC,mBAAmB,EAAE,CAAC;IACtBC,sBAAsB,EAAE,CAAC;IACzBC,cAAc,EAAE;EAClB,CAAC;EACDX,KAAK,EAAE;IACLY,SAAS,EAAE,QAAQ;IACnBC,kBAAkB,EAAE;EACtB;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ViewerLivestreamTopView = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _DurationBadge = require("./DurationBadge");
|
|
10
|
+
var _LiveIndicator = require("./LiveIndicator");
|
|
11
|
+
var _FollowerCount = require("./FollowerCount");
|
|
12
|
+
var _contexts = require("../../../contexts");
|
|
13
|
+
var _constants = require("../../../constants");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
/**
|
|
16
|
+
* Props for the ViewerLivestreamTopView component.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The ViewerLivestreamTopView component displays the top view component of the viewer's live stream.
|
|
21
|
+
*/
|
|
22
|
+
const ViewerLivestreamTopView = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
DurationBadge = _DurationBadge.DurationBadge,
|
|
25
|
+
LiveIndicator = _LiveIndicator.LiveIndicator,
|
|
26
|
+
FollowerCount = _FollowerCount.FollowerCount
|
|
27
|
+
} = _ref;
|
|
28
|
+
const {
|
|
29
|
+
theme: {
|
|
30
|
+
colors,
|
|
31
|
+
viewerLivestreamTopView
|
|
32
|
+
}
|
|
33
|
+
} = (0, _contexts.useTheme)();
|
|
34
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
35
|
+
style: [styles.container, {
|
|
36
|
+
backgroundColor: colors.static_overlay
|
|
37
|
+
}, viewerLivestreamTopView.container]
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
39
|
+
style: [styles.leftElement, viewerLivestreamTopView.leftElement]
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
41
|
+
style: [styles.liveInfo, viewerLivestreamTopView.liveInfo]
|
|
42
|
+
}, LiveIndicator && /*#__PURE__*/_react.default.createElement(LiveIndicator, null), FollowerCount && /*#__PURE__*/_react.default.createElement(FollowerCount, null))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
43
|
+
style: [styles.centerElement, viewerLivestreamTopView.centerElement]
|
|
44
|
+
}, DurationBadge && /*#__PURE__*/_react.default.createElement(DurationBadge, {
|
|
45
|
+
mode: "viewer"
|
|
46
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
47
|
+
style: [styles.rightElement, viewerLivestreamTopView.rightElement]
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
exports.ViewerLivestreamTopView = ViewerLivestreamTopView;
|
|
51
|
+
const styles = _reactNative.StyleSheet.create({
|
|
52
|
+
container: {
|
|
53
|
+
position: 'absolute',
|
|
54
|
+
top: 0,
|
|
55
|
+
flexDirection: 'row',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
paddingVertical: 16,
|
|
58
|
+
paddingHorizontal: 8,
|
|
59
|
+
borderBottomEndRadius: 8,
|
|
60
|
+
borderBottomStartRadius: 8,
|
|
61
|
+
zIndex: _constants.Z_INDEX.IN_FRONT
|
|
62
|
+
},
|
|
63
|
+
liveInfo: {
|
|
64
|
+
flexDirection: 'row'
|
|
65
|
+
},
|
|
66
|
+
leftElement: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
alignItems: 'flex-start'
|
|
69
|
+
},
|
|
70
|
+
centerElement: {
|
|
71
|
+
flex: 1,
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
flexGrow: 3
|
|
74
|
+
},
|
|
75
|
+
rightElement: {
|
|
76
|
+
flex: 1,
|
|
77
|
+
alignItems: 'flex-end'
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=ViewerLivestreamTopView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_DurationBadge","_LiveIndicator","_FollowerCount","_contexts","_constants","obj","__esModule","default","ViewerLivestreamTopView","_ref","DurationBadge","DefaultDurationBadge","LiveIndicator","DefaultLiveIndicator","FollowerCount","DefaultFollowerCount","theme","colors","viewerLivestreamTopView","useTheme","createElement","View","style","styles","container","backgroundColor","static_overlay","leftElement","liveInfo","centerElement","mode","rightElement","exports","StyleSheet","create","position","top","flexDirection","alignItems","paddingVertical","paddingHorizontal","borderBottomEndRadius","borderBottomStartRadius","zIndex","Z_INDEX","IN_FRONT","flex","flexGrow"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamTopView/ViewerLivestreamTopView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAIA,IAAAG,cAAA,GAAAH,OAAA;AAIA,IAAAI,cAAA,GAAAJ,OAAA;AAIA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAA6C,SAAAD,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE7C;AACA;AACA;;AAgBA;AACA;AACA;AACO,MAAMG,uBAAuB,GAAGC,IAAA,IAIH;EAA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AAM,CAACQ,YAAY,EAAEb,uBAAuB,CAACa,YAAY;EAAE,CACpE,CACG,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAxB,uBAAA,GAAAA,uBAAA;AAEF,MAAMe,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,CAAC;IACpBC,qBAAqB,EAAE,CAAC;IACxBC,uBAAuB,EAAE,CAAC;IAC1BC,MAAM,EAAEC,kBAAO,CAACC;EAClB,CAAC;EACDjB,QAAQ,EAAE;IACRS,aAAa,EAAE;EACjB,CAAC;EACDV,WAAW,EAAE;IACXmB,IAAI,EAAE,CAAC;IACPR,UAAU,EAAE;EACd,CAAC;EACDT,aAAa,EAAE;IACbiB,IAAI,EAAE,CAAC;IACPR,UAAU,EAAE,QAAQ;IACpBS,QAAQ,EAAE;EACZ,CAAC;EACDhB,YAAY,EAAE;IACZe,IAAI,EAAE,CAAC;IACPR,UAAU,EAAE;EACd;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _DurationBadge = require("./DurationBadge");
|
|
7
|
+
Object.keys(_DurationBadge).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _DurationBadge[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _DurationBadge[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _FollowerCount = require("./FollowerCount");
|
|
18
|
+
Object.keys(_FollowerCount).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _FollowerCount[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _FollowerCount[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _LiveIndicator = require("./LiveIndicator");
|
|
29
|
+
Object.keys(_LiveIndicator).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _LiveIndicator[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _LiveIndicator[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _HostLivestreamTopView = require("./HostLivestreamTopView");
|
|
40
|
+
Object.keys(_HostLivestreamTopView).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _HostLivestreamTopView[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _HostLivestreamTopView[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_DurationBadge","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_FollowerCount","_LiveIndicator","_HostLivestreamTopView"],"sourceRoot":"../../../../../src","sources":["components/Livestream/LivestreamTopView/index.ts"],"mappings":";;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,cAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAA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UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,sBAAA,CAAAP,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ViewerLivestream = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _hooks = require("../../../hooks");
|
|
10
|
+
var _contexts = require("../../../contexts");
|
|
11
|
+
var _ViewerLivestreamTopView = require("../LivestreamTopView/ViewerLivestreamTopView");
|
|
12
|
+
var _ViewerLivestreamControls = require("../LivestreamControls/ViewerLivestreamControls");
|
|
13
|
+
var _LivestreamLayout = require("../LivestreamLayout");
|
|
14
|
+
var _videoReactBindings = require("@stream-io/video-react-bindings");
|
|
15
|
+
var _Participant = require("../../Participant");
|
|
16
|
+
var _constants = require("../../../constants");
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
/**
|
|
19
|
+
* Props for the ViewerLivestream component.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The ViewerLivestream component renders the UI for the Viewer's live stream.
|
|
24
|
+
*/
|
|
25
|
+
const ViewerLivestream = _ref => {
|
|
26
|
+
let {
|
|
27
|
+
ViewerLivestreamTopView = _ViewerLivestreamTopView.ViewerLivestreamTopView,
|
|
28
|
+
ViewerLivestreamControls = _ViewerLivestreamControls.ViewerLivestreamControls,
|
|
29
|
+
LivestreamLayout = _LivestreamLayout.LivestreamLayout,
|
|
30
|
+
FloatingParticipantView = _Participant.FloatingParticipantView,
|
|
31
|
+
LiveIndicator,
|
|
32
|
+
FollowerCount,
|
|
33
|
+
DurationBadge,
|
|
34
|
+
ViewerLeaveStreamButton,
|
|
35
|
+
onLeaveStreamHandler
|
|
36
|
+
} = _ref;
|
|
37
|
+
const {
|
|
38
|
+
theme: {
|
|
39
|
+
colors,
|
|
40
|
+
viewerLivestream
|
|
41
|
+
}
|
|
42
|
+
} = (0, _contexts.useTheme)();
|
|
43
|
+
const {
|
|
44
|
+
useHasOngoingScreenShare,
|
|
45
|
+
useParticipants
|
|
46
|
+
} = (0, _videoReactBindings.useCallStateHooks)();
|
|
47
|
+
const hasOngoingScreenShare = useHasOngoingScreenShare();
|
|
48
|
+
const [currentSpeaker] = useParticipants();
|
|
49
|
+
|
|
50
|
+
// Automatically route audio to speaker devices as relevant for watching videos.
|
|
51
|
+
(0, _hooks.useIncallManager)({
|
|
52
|
+
media: 'video',
|
|
53
|
+
auto: true
|
|
54
|
+
});
|
|
55
|
+
const topViewProps = {
|
|
56
|
+
LiveIndicator,
|
|
57
|
+
FollowerCount,
|
|
58
|
+
DurationBadge
|
|
59
|
+
};
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.SafeAreaView, {
|
|
61
|
+
style: [styles.container, {
|
|
62
|
+
backgroundColor: colors.static_grey
|
|
63
|
+
}, viewerLivestream.container]
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
65
|
+
style: [styles.view, viewerLivestream.view]
|
|
66
|
+
}, ViewerLivestreamTopView && /*#__PURE__*/_react.default.createElement(ViewerLivestreamTopView, topViewProps), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
67
|
+
style: [styles.floatingParticipantView, viewerLivestream.floatingParticipantView]
|
|
68
|
+
}, hasOngoingScreenShare && FloatingParticipantView && /*#__PURE__*/_react.default.createElement(FloatingParticipantView, {
|
|
69
|
+
participant: currentSpeaker
|
|
70
|
+
})), ViewerLivestreamControls && /*#__PURE__*/_react.default.createElement(ViewerLivestreamControls, {
|
|
71
|
+
ViewerLeaveStreamButton: ViewerLeaveStreamButton,
|
|
72
|
+
onLeaveStreamHandler: onLeaveStreamHandler
|
|
73
|
+
})), LivestreamLayout && /*#__PURE__*/_react.default.createElement(LivestreamLayout, null));
|
|
74
|
+
};
|
|
75
|
+
exports.ViewerLivestream = ViewerLivestream;
|
|
76
|
+
const styles = _reactNative.StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
flex: 1
|
|
79
|
+
},
|
|
80
|
+
floatingParticipantView: {
|
|
81
|
+
flex: 1
|
|
82
|
+
},
|
|
83
|
+
view: {
|
|
84
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
|
85
|
+
zIndex: _constants.Z_INDEX.IN_FRONT
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
//# sourceMappingURL=ViewerLivestream.js.map
|