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 {
|
||||
type IRemoteVideoTrack,
|
||||
useIsConnected, useLocalCameraTrack, useLocalMicrophoneTrack, usePublish,
|
||||
useRemoteAudioTracks,
|
||||
useRemoteUsers,
|
||||
|
@ -19,6 +18,7 @@ export const UsersGroupPanel = ({ calling, micOn, cameraOn }: UsersGroupPanelPro
|
|||
const remoteUsers = useRemoteUsers();
|
||||
const { localMicrophoneTrack } = useLocalMicrophoneTrack(micOn);
|
||||
const { localCameraTrack } = useLocalCameraTrack(cameraOn);
|
||||
const { videoTracks } = useRemoteVideoTracks(remoteUsers);
|
||||
const { audioTracks } = useRemoteAudioTracks(remoteUsers);
|
||||
|
||||
usePublish([localMicrophoneTrack, localCameraTrack]);
|
||||
|
@ -34,9 +34,9 @@ export const UsersGroupPanel = ({ calling, micOn, cameraOn }: UsersGroupPanelPro
|
|||
videoTrack={localCameraTrack}
|
||||
/>
|
||||
</div>
|
||||
{remoteUsers.length > 0 && remoteUsers.map(({ uid, videoTrack }) => (
|
||||
<div key={uid}>
|
||||
<RemoteVideoPlayer track={videoTrack} />
|
||||
{remoteUsers.length > 0 && remoteUsers.map((user) => (
|
||||
<div key={user.uid}>
|
||||
<RemoteVideoPlayer track={user.videoTrack} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
@ -15,18 +15,17 @@ export const CreateRoom = ({ locale, jwt }: { locale: string, jwt: string }) =>
|
|||
const router = useRouter();
|
||||
|
||||
const getRoom = debounce(() => {
|
||||
setRoomId(2556);
|
||||
// createRoom(locale, jwt)
|
||||
// .then((data) => {
|
||||
// setRoomId(data);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// setLoading(false);
|
||||
// })
|
||||
createRoom(locale, jwt)
|
||||
.then((data) => {
|
||||
setRoomId(data);
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
}, 500);
|
||||
|
||||
useEffect(() => {
|
||||
// setLoading(true);
|
||||
setLoading(true);
|
||||
getRoom();
|
||||
}, []);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ export const EditRoomForm = ({ roomId, locale, jwt, mode, afterSubmit }: EditRoo
|
|||
if (editingRoom?.availableSlots) {
|
||||
editingRoom.availableSlots.forEach(({ startTime }) => {
|
||||
const [date] = startTime.split('T');
|
||||
dateList.add(date);
|
||||
dateList.add(dayjs(date).format('YYYY-MM-DD'));
|
||||
});
|
||||
|
||||
return Array.from(dateList);
|
||||
|
@ -77,9 +77,9 @@ export const EditRoomForm = ({ roomId, locale, jwt, mode, afterSubmit }: EditRoo
|
|||
}, [editingRoom?.availableSlots]);
|
||||
|
||||
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) {
|
||||
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')}` }));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue