feat: fix agora, fix creating room
This commit is contained in:
parent
9a3aa98158
commit
0222335694
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"applinks": {
|
||||||
|
"apps": [],
|
||||||
|
"details": [
|
||||||
|
{
|
||||||
|
"appID": "GTYAM4FYH3.com.bbuddy.whistle",
|
||||||
|
"paths": ["/en/experts/*"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"relation": ["delegate_permission/common.handle_all_urls"],
|
||||||
|
"target": {
|
||||||
|
"namespace": "android_app",
|
||||||
|
"package_name": "com.bbuddy.whistle",
|
||||||
|
"sha256_cert_fingerprints": [
|
||||||
|
"87:A2:49:9A:F4:05:9C:06:3C:3D:F3:10:88:F5:49:6D:5F:F2:BC:1E:90:0D:F2:37:A5:BA:37:19:5C:A3:75:C2",
|
||||||
|
"86:42:FE:EA:44:22:9D:16:7F:FC:70:92:A6:39:9D:B1:C3:F1:DE:21:32:4A:45:8C:07:98:39:55:AF:47:32:66"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -1,5 +1,4 @@
|
||||||
import {
|
import {
|
||||||
type IRemoteVideoTrack,
|
|
||||||
useIsConnected, useLocalCameraTrack, useLocalMicrophoneTrack, usePublish,
|
useIsConnected, useLocalCameraTrack, useLocalMicrophoneTrack, usePublish,
|
||||||
useRemoteAudioTracks,
|
useRemoteAudioTracks,
|
||||||
useRemoteUsers,
|
useRemoteUsers,
|
||||||
|
@ -19,6 +18,7 @@ export const UsersGroupPanel = ({ calling, micOn, cameraOn }: UsersGroupPanelPro
|
||||||
const remoteUsers = useRemoteUsers();
|
const remoteUsers = useRemoteUsers();
|
||||||
const { localMicrophoneTrack } = useLocalMicrophoneTrack(micOn);
|
const { localMicrophoneTrack } = useLocalMicrophoneTrack(micOn);
|
||||||
const { localCameraTrack } = useLocalCameraTrack(cameraOn);
|
const { localCameraTrack } = useLocalCameraTrack(cameraOn);
|
||||||
|
const { videoTracks } = useRemoteVideoTracks(remoteUsers);
|
||||||
const { audioTracks } = useRemoteAudioTracks(remoteUsers);
|
const { audioTracks } = useRemoteAudioTracks(remoteUsers);
|
||||||
|
|
||||||
usePublish([localMicrophoneTrack, localCameraTrack]);
|
usePublish([localMicrophoneTrack, localCameraTrack]);
|
||||||
|
@ -34,9 +34,9 @@ export const UsersGroupPanel = ({ calling, micOn, cameraOn }: UsersGroupPanelPro
|
||||||
videoTrack={localCameraTrack}
|
videoTrack={localCameraTrack}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{remoteUsers.length > 0 && remoteUsers.map(({ uid, videoTrack }) => (
|
{remoteUsers.length > 0 && remoteUsers.map((user) => (
|
||||||
<div key={uid}>
|
<div key={user.uid}>
|
||||||
<RemoteVideoPlayer track={videoTrack} />
|
<RemoteVideoPlayer track={user.videoTrack} />
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,18 +15,17 @@ export const CreateRoom = ({ locale, jwt }: { locale: string, jwt: string }) =>
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const getRoom = debounce(() => {
|
const getRoom = debounce(() => {
|
||||||
setRoomId(2556);
|
createRoom(locale, jwt)
|
||||||
// createRoom(locale, jwt)
|
.then((data) => {
|
||||||
// .then((data) => {
|
setRoomId(data);
|
||||||
// setRoomId(data);
|
})
|
||||||
// })
|
.finally(() => {
|
||||||
// .finally(() => {
|
setLoading(false);
|
||||||
// setLoading(false);
|
})
|
||||||
// })
|
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// setLoading(true);
|
setLoading(true);
|
||||||
getRoom();
|
getRoom();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ export const EditRoomForm = ({ roomId, locale, jwt, mode, afterSubmit }: EditRoo
|
||||||
if (editingRoom?.availableSlots) {
|
if (editingRoom?.availableSlots) {
|
||||||
editingRoom.availableSlots.forEach(({ startTime }) => {
|
editingRoom.availableSlots.forEach(({ startTime }) => {
|
||||||
const [date] = startTime.split('T');
|
const [date] = startTime.split('T');
|
||||||
dateList.add(date);
|
dateList.add(dayjs(date).format('YYYY-MM-DD'));
|
||||||
});
|
});
|
||||||
|
|
||||||
return Array.from(dateList);
|
return Array.from(dateList);
|
||||||
|
@ -77,9 +77,9 @@ export const EditRoomForm = ({ roomId, locale, jwt, mode, afterSubmit }: EditRoo
|
||||||
}, [editingRoom?.availableSlots]);
|
}, [editingRoom?.availableSlots]);
|
||||||
|
|
||||||
const getTimeOptions = (slots?: Slot[], curDate?: Dayjs) => {
|
const getTimeOptions = (slots?: Slot[], curDate?: Dayjs) => {
|
||||||
const date = curDate ? curDate.utc().format('YYYY-MM-DD') : '';
|
const date = curDate ? curDate.format('YYYY-MM-DD') : '';
|
||||||
if (slots && slots?.length && date) {
|
if (slots && slots?.length && date) {
|
||||||
return slots.filter(({ startTime }) => startTime.indexOf(date) > -1)
|
return slots.filter(({ startTime }) => dayjs(startTime).format('YYYY-MM-DD') === date)
|
||||||
.map(({ startTime, endTime }) => ({ value: startTime, label: `${dayjs(startTime).format('HH:mm')} - ${dayjs(endTime).format('HH:mm')}` }));
|
.map(({ startTime, endTime }) => ({ value: startTime, label: `${dayjs(startTime).format('HH:mm')} - ${dayjs(endTime).format('HH:mm')}` }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue