v1.3.0-beta/voice call implemented
This commit is contained in:
+14
-4
@@ -33,14 +33,16 @@ export const getPlayerSource = () => {
|
||||
};
|
||||
|
||||
export const LocalData = () => {
|
||||
return JSON.parse(window.localStorage.getItem('WatchParty')) || {};
|
||||
return window.localStorage.getItem('WatchParty')
|
||||
? JSON.parse(window.localStorage.getItem('WatchParty'))
|
||||
: {};
|
||||
};
|
||||
|
||||
export const updateLocalData = (data) => {
|
||||
window.localStorage.setItem('WatchParty', JSON.stringify(Object.assign({}, LocalData(), data)));
|
||||
};
|
||||
|
||||
export const emptyLocalData = () => window.localStorage.setItem('WatchParty', undefined);
|
||||
export const emptyLocalData = () => window.localStorage.reject('WatchParty');
|
||||
|
||||
export const getUserUid = async () =>
|
||||
new Promise((resolve, reject) => {
|
||||
@@ -100,14 +102,14 @@ export const SendMessageApi = async (data) => {
|
||||
|
||||
export const LeaveRoomApi = async (data) => {
|
||||
return fetcher({
|
||||
endpoint: `leave/${data.roomId}/users/${data.uid}`,
|
||||
endpoint: `leave/${data.partyName}/users/${data.userUid}`,
|
||||
method: 'DELETE',
|
||||
});
|
||||
};
|
||||
|
||||
export const DeleteRoomApi = async (data) => {
|
||||
return fetcher({
|
||||
endpoint: `delete/${data.roomId}`,
|
||||
endpoint: `delete/${data.partyName}`,
|
||||
method: 'DELETE',
|
||||
});
|
||||
};
|
||||
@@ -133,3 +135,11 @@ export const GetRefreshedVoxeetTokenApi = async (data) => {
|
||||
method: 'GET',
|
||||
});
|
||||
};
|
||||
|
||||
export const UpdateVoxeetApi = async (data) => {
|
||||
return fetcher({
|
||||
endpoint: 'updateVoxeet',
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user