rework needed

This commit is contained in:
TonyChyi
2022-09-27 10:21:06 +08:00
parent 821c0cffb8
commit 18f5d649d1
9 changed files with 141 additions and 104 deletions

View File

@@ -20,12 +20,10 @@ const controlEventTypes = {
restart: 0,
};
const makeEvent = (evType, args) => {
return {
type: eventTypes[evType],
args: args,
};
};
const makeEvent = (evType, args) => ({
type: eventTypes[evType],
args: args,
});
// eslint-disable-next-line
const sendSpecialKey = (key) => {
@@ -139,7 +137,7 @@ onMounted(() => {
ajax
.exchangeSDP(offer)
.then((answer) =>
pc.setRemoteDescription(new RTCSessionDescription(answer))
pc.setRemoteDescription(new RTCSessionDescription(answer.data))
);
});
});