Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Refactored topic structure for more granular flow and access #652

Merged
merged 103 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
75f9c66
WIP: topics list
hi-liang Jun 6, 2024
6e56ea4
Set topics as strings for custom String.formatStr
hi-liang Jun 11, 2024
56a046b
Remove vestigial vio publishing
hi-liang Jun 12, 2024
98d326b
Refactor arena-camera to use SCENE_CAMERA topic
hi-liang Jun 12, 2024
59f96b6
Consolidate user camera and user hand topics
hi-liang Jun 12, 2024
0cc784c
Refactor arena-hand to use SCENE_USER topic
hi-liang Jun 12, 2024
baaed9d
Refactor mqtt and worker to use defined topics
hi-liang Jun 13, 2024
39580e2
Refactor out renderTopic, used prev for write check
hi-liang Jun 13, 2024
238cb70
Restore config "realm" into topic templates
hi-liang Jun 13, 2024
84be3bb
Set entity attr for new `private` top level param
hi-liang Jun 13, 2024
996dddc
Refactor aabb collider for new topics
hi-liang Jun 13, 2024
8926dbf
Refactor gesture-detector for new scene topic
hi-liang Jun 13, 2024
f606df2
Refactor click-listener with new topics
hi-liang Jun 13, 2024
262b9ba
Refactor collision listener topics
hi-liang Jun 13, 2024
f55b975
Refactor ar-hit-test-listener topics
hi-liang Jun 14, 2024
0c756f8
Add nonuser offset for renderpriv and debug topics
hi-liang Jun 14, 2024
da747d9
Use new ns/scene scoped debug topic
hi-liang Jun 14, 2024
28eae11
Refactor UI card, buttons, text-input topics
hi-liang Jun 14, 2024
3fa2b83
Update facetracker topic
hi-liang Jun 14, 2024
8e9009f
Refactor build3d publish topics
hi-liang Jun 14, 2024
1a47191
Cleanup unused outputTopic, etc
hi-liang Jun 14, 2024
bd9cf69
Refactor chat topics
hi-liang Jun 14, 2024
db7f75e
Add reusable ARENA.topicParams
hi-liang Jun 17, 2024
662898a
Refactor mesh/plane publisher
hi-liang Jun 17, 2024
e4cd60c
Refactor apriltag publish, set priv env topic
hi-liang Jun 17, 2024
20fcd2c
Update runtime topics
hi-liang Jun 18, 2024
4ab3ef3
Refactor build topic publishes
hi-liang Jun 18, 2024
2df92b5
fix: Topic to/from order for scene
hi-liang Jun 21, 2024
3ac312e
fix: var name for sceneObj private
hi-liang Jul 8, 2024
04dd3a5
Add positional tokens to topic constants
hi-liang Jul 8, 2024
58d67ec
Use defined positional tokens in mqtt topic split
hi-liang Jul 8, 2024
126ace3
Add topic uuid validation for json msgs on worker
hi-liang Jul 11, 2024
df2dec0
Don't validate chat topics on worker
hi-liang Jul 11, 2024
a0cba43
Consolidate camName into idTag
hi-liang Jul 26, 2024
9ade459
Add getUsernameFromIdTag util
hi-liang Jul 26, 2024
7c5e97d
Consolidate chat under scene context
hi-liang Jul 26, 2024
a212238
Add private scene presence topic
hi-liang Jul 27, 2024
18e88f3
WIP: start splitting chat and presence
hi-liang Jul 27, 2024
1becc95
WIP: Dispatch sceneMsg handler by scenemsg type
hi-liang Jul 27, 2024
f5d36f3
Add SCENE_MSGTYPES to constants
hi-liang Jul 29, 2024
1bc7983
Default cameras to TTL in 30s
hi-liang Jul 30, 2024
6e53327
Add presence message handling, cleanup chat
hi-liang Jul 30, 2024
b9ce9f8
fix: various chat/mqtt/components
hi-liang Jul 31, 2024
f0fbbeb
fix: query selector for dep
hi-liang Jul 31, 2024
3acdf8e
Remove btoa suffix on chat idTag
hi-liang Jul 31, 2024
5a93319
There is no try, only do
hi-liang Jul 31, 2024
101ad9d
fix: typod var for scenename
hi-liang Jul 31, 2024
69f0712
remove unused imports
hi-liang Jul 31, 2024
7ae3c9c
Cleanup ARENA and cameraName refs in jitsi
hi-liang Jul 31, 2024
d7007a8
Further remove un, consolidate as dn in chat
hi-liang Jul 31, 2024
60c2f10
fix: properly handle userlist update from jitsi
hi-liang Jul 31, 2024
3b26a9e
fix: ttl single property per doc examples
hi-liang Jul 31, 2024
27c6bbb
fix: chat msg payload
hi-liang Jul 31, 2024
c07dcea
fix: chat touid/displayname
hi-liang Jul 31, 2024
5dd8e40
fix: loadsceneobjs call new scene obj handlers
hi-liang Jul 31, 2024
560f651
revert: don't set component deps
hi-liang Jul 31, 2024
62eeafc
fix: delay topics set for box collide
hi-liang Jul 31, 2024
a2a3923
Handle program_id object flags
hi-liang Aug 1, 2024
e01e4d2
refactor: all clientEvent message structure
hi-liang Aug 1, 2024
b912622
Update clientEvent handler
hi-liang Aug 1, 2024
258b638
fix: typo
hi-liang Aug 1, 2024
ba5d83c
Add private and program_id to build schema
hi-liang Aug 1, 2024
c793408
fix: consistency of ttl usage
hi-liang Aug 1, 2024
a15cee6
Use timestamp instead of additl from_time field
hi-liang Aug 1, 2024
d497295
fix: imports for build
hi-liang Aug 6, 2024
54422ac
Add private and program_id fields to build schemas
hi-liang Aug 6, 2024
7f2d0a3
Add formatStr proto func for build/main
hi-liang Aug 7, 2024
6638952
Update device pub/sub topics
hi-liang Aug 8, 2024
210e315
update client rest urls for new account api
mwfarb Aug 13, 2024
d1e1366
adding some notes for refactor @EdwardLu2018
mwfarb Aug 14, 2024
2a4dae0
update build ui check with topic template
mwfarb Aug 14, 2024
be587c1
update topics todos
mwfarb Aug 19, 2024
2171af0
fixed isUsersPermitted using old topics
mwfarb Aug 19, 2024
4582757
fix build3d MutiationObserver this.TopicBase scope crash
mwfarb Aug 19, 2024
22db2d4
enable chat/message ui with jwt check
mwfarb Aug 27, 2024
1bb08a2
fix errors in user presense permission checks
mwfarb Aug 27, 2024
e7ca859
also disable chat in build3d
mwfarb Aug 28, 2024
7d5bab7
lint/format: autofix
hi-liang Sep 6, 2024
7ab8d9d
fix: typo on privPres pub topic
hi-liang Sep 18, 2024
3dd40e8
Add MQTT_SUBSCRIBED event for sensitive msg timing
hi-liang Sep 18, 2024
3c5d5d0
fix: proxied func can't be in obj
hi-liang Sep 18, 2024
fc8f508
lint update
mwfarb Sep 24, 2024
f4faa38
fix(build): fixed incorrect ns/scene ids
mwfarb Sep 24, 2024
6ac46c8
fix(build): identify build client on mqtt bus
mwfarb Sep 25, 2024
39d1b90
Move JITSI_EVENTS.CONNECTED to arena eventmanager
hi-liang Sep 26, 2024
5bfee97
fix chat display from merge
mwfarb Sep 26, 2024
c4b19ff
fix: ttl schema usage, time-extending behavior
hi-liang Oct 1, 2024
cacb97d
Add jitter to arena-camera TTL to force update()
hi-liang Oct 1, 2024
075d946
Revert previous ttl schema with nested seconds
hi-liang Oct 2, 2024
3d92689
Add description note for TTL re: top level prop
hi-liang Oct 3, 2024
29412c5
update build subscribe to new schema
mwfarb Oct 3, 2024
d33c4cd
render fusion draft
mwfarb Oct 4, 2024
7b8e8d7
update remote render pub/sub
mwfarb Oct 7, 2024
9103eef
update clientEvent and it's deprecated fields
mwfarb Oct 9, 2024
d41184f
update screenshare for non-owners
mwfarb Oct 9, 2024
5520cb8
update docs with new topics
mwfarb Oct 9, 2024
807e21f
add temp subs for render fusion
mwfarb Oct 10, 2024
cebd9f7
fixes ttl seconds expression, all consumers and producers are expecti…
mwfarb Oct 14, 2024
994d9f0
object program id tags no longer required
mwfarb Oct 14, 2024
8bbe36c
feat: runtime mngr using new topics
nampereira Oct 14, 2024
51b839e
fix: remove tmp formatStr definition
nampereira Oct 14, 2024
e039da0
cleanup logging
mwfarb Oct 14, 2024
84afbb9
Merge branch 'master' into topic-v5
mwfarb Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build/arena-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ export default class ARENAUserAccount {
* @return {UserAccountData} object with user account data
*/
static async userAuthState() {
return ARENAUserAccount._makeRequest('GET', `/user/user_state`);
return ARENAUserAccount._makeRequest('GET', `/user/v2/user_state`);
}

/**
* Request scene names which the user has permission to from user database
* @return {[string]} list of scene names
*/
static async userScenes() {
return ARENAUserAccount._makeRequest('GET', '/user/my_scenes');
return ARENAUserAccount._makeRequest('GET', '/user/v2/my_scenes');
}

/**
Expand All @@ -80,15 +80,15 @@ export default class ARENAUserAccount {
static async requestUserNewScene(sceneNamespace, isPublic = false) {
const params = new FormData();
// TODO: add public parameter
return ARENAUserAccount._makeRequest('POST', `/user/scenes/${sceneNamespace}`);
return ARENAUserAccount._makeRequest('POST', `/user/v2/scenes/${sceneNamespace}`);
}

/**
* Request to delete scene permissions from user db
* @param {string} sceneNamespace name of the scene without namespace
*/
static async requestDeleteUserScene(sceneNamespace) {
return ARENAUserAccount._makeRequest('DELETE', `/user/scenes/${sceneNamespace}`);
return ARENAUserAccount._makeRequest('DELETE', `/user/v2/scenes/${sceneNamespace}`);
}

/**
Expand All @@ -105,7 +105,7 @@ export default class ARENAUserAccount {
// pages /scenes and /build should have general permissions for the user's scene objects
const result = await ARENAUserAccount._makeRequest(
'POST',
`/user/mqtt_auth`,
`/user/v2/mqtt_auth`,
params,
'application/x-www-form-urlencoded'
);
Expand Down
15 changes: 13 additions & 2 deletions build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* eslint-disable import/extensions */
import * as PersistObjects from './persist-objects.js';
import ARENAUserAccount from './arena-account.js';
import TOPICS from '../src/constants/topics.js';

const Alert = Swal.mixin({
toast: true,
Expand Down Expand Up @@ -853,7 +854,7 @@ window.addEventListener('onauth', async (e) => {
// add scene if it does not exist
if (newScene) await PersistObjects.addNewScene(namespaceinput.value, sceneinput.value, undefined);

await PersistObjects.addObject(obj, `${namespaceinput.value}/${sceneinput.value}`);
await PersistObjects.addObject(obj, namespaceinput.value, sceneinput.value);
setTimeout(async () => {
PersistObjects.populateObjectList(
`${namespaceinput.value}/${sceneinput.value}`,
Expand Down Expand Up @@ -1036,7 +1037,11 @@ Swal.fire({
* @param {string} mqttToken
*/
function updatePublishControlsByToken(namespace, scenename, mqttToken) {
const objectsTopic = `realm/s/${namespace}/${scenename}`;
const objectsTopic = TOPICS.PUBLISH.SCENE_OBJECTS.formatStr({
nameSpace: namespace,
sceneName: scenename,
objectId: '+',
});
const editor = ARENAAUTH.isUserSceneEditor(mqttToken, objectsTopic);
const delButton = document.getElementById('delobj');
const deleteSceneButton = document.getElementById('deletescene');
Expand All @@ -1051,3 +1056,9 @@ function updatePublishControlsByToken(namespace, scenename, mqttToken) {
item.disabled = !editor;
});
}

// eslint-disable-next-line no-extend-native
String.prototype.formatStr = function formatStr(...args) {
const params = arguments.length === 1 && typeof args[0] === 'object' ? args[0] : args;
return this.replace(/\{([^}]+)\}/g, (match, key) => (typeof params[key] !== 'undefined' ? params[key] : match));
};
3 changes: 1 addition & 2 deletions build/mqtt-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export default class MqttClient {
host: st.host !== undefined ? st.host : 'arena.andrew.cmu.edu',
port: st.port !== undefined ? st.port : 8083,
path: st.path !== undefined ? st.path : '/mqtt/',
clientid:
st.clientid !== undefined ? st.clientid : `build-client-${Math.round(Math.random() * 10000)}`,
clientid: st.clientid !== undefined ? st.clientid : `build-client-${Math.round(Math.random() * 10000)}`,
subscribeTopics: st.subscribeTopics,
onConnectCallback: st.onConnectCallback,
onConnectCallbackContext: st.onConnectCallbackContext,
Expand Down
22 changes: 17 additions & 5 deletions build/persist-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* global Alert, ARENAAUTH, ARENADefaults, Swal, THREE */
/* eslint-disable import/extensions */
import TOPICS from '../src/constants/topics.js';
import MqttClient from './mqtt-client.js';
import ARENAUserAccount from './arena-account.js';
import { TTLCache } from './ttl-cache.js';
Expand Down Expand Up @@ -369,7 +370,10 @@ export function updateSubscribeTopic(scene) {

if (persist.currentScene) persist.mc.unsubscribe(persist.currentScene);
if (scene) {
const topic = `realm/s/${scene}/#`;
const topic = TOPICS.SUBSCRIBE.SCENE_PUBLIC.formatStr({
nameSpace: scene.split('/')[0],
sceneName: scene.split('/')[1],
});
persist.mc.subscribe(topic);
persist.currentScene = scene;
populateProgramInstanceList();
Expand Down Expand Up @@ -556,7 +560,7 @@ export async function addNewScene(ns, sceneName, newObjs) {

// add objects to the new scene
newObjs.forEach((obj) => {
addObject(obj, `${ns}/${sceneName}`);
addObject(obj, ns, sceneName);
});
return exists;
}
Expand Down Expand Up @@ -604,7 +608,11 @@ export function performActionArgObjList(action, scene, objList, json = true) {
scene = `${obj.namespace}/${obj.sceneId}`;
theNewScene = obj.sceneId;
}
const topic = `realm/s/${scene}/${obj.object_id}`;
const topic = TOPICS.PUBLISH.SCENE_OBJECTS.formatStr({
nameSpace: theNewScene.split('/')[0],
sceneName: theNewScene.split('/')[1],
objectId: obj.object_id,
});
console.info(`Publish [ ${topic}]: ${actionObj}`);
try {
persist.mc.publish(topic, actionObj);
Expand Down Expand Up @@ -634,7 +642,7 @@ export function clearSelected() {
}
}

export async function addObject(obj, scene) {
export async function addObject(obj, nameSpace, sceneName) {
let found = false;
if (!persist.mqttConnected) mqttReconnect();

Expand Down Expand Up @@ -674,7 +682,11 @@ export async function addObject(obj, scene) {

const persistAlert = obj.persist === false ? '<br/><strong>Object not persisted.</strong>' : '';
const objJson = JSON.stringify(obj);
const topic = `realm/s/${scene}/${obj.object_id}`;
const topic = TOPICS.PUBLISH.SCENE_OBJECTS.formatStr({
nameSpace,
sceneName,
objectId: obj.object_id,
});
console.info(`Publish [ ${topic}]: ${objJson}`);
try {
persist.mc.publish(topic, objJson);
Expand Down
6 changes: 3 additions & 3 deletions build/schemas/arena-program.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"args": {
"type": "array",
"description": "Command-line arguments (passed in argv). Supports variables: ${scene}, ${mqtth}, ${cameraid}, ${username}, ${runtimeid}, ${moduleid}, ${query-string-key}.",
"description": "Command-line arguments (passed in argv). Supports variables: ${scene}, ${mqtth}, ${userid}, ${username}, ${runtimeid}, ${moduleid}, ${query-string-key}.",
"uniqueItems": false,
"items": {
"type": "string",
Expand All @@ -71,7 +71,7 @@
},
"env": {
"type": "array",
"description": "Environment variables. Supports variables: ${scene}, ${namespace}, ${mqtth}, ${cameraid}, ${username}, ${runtimeid}, ${moduleid}, ${query-string-key}.",
"description": "Environment variables. Supports variables: ${scene}, ${namespace}, ${mqtth}, ${userid}, ${username}, ${runtimeid}, ${moduleid}, ${query-string-key}.",
"uniqueItems": false,
"items": {
"type": "string",
Expand Down Expand Up @@ -136,7 +136,7 @@
"type": "pubsub",
"mode": "rw",
"params": {
"topic": "realm/s/${scene}"
"topic": "realm/s/${scene}/${namespace}"
}
}
]
Expand Down
11 changes: 10 additions & 1 deletion build/schemas/definitions-arena-object.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@
},
"ttl": {
"description": "When applied to an entity, the entity will remove itself from DOM after the specified number of seconds. Update is allowed, which will reset the timer to start from that moment.",
"type": "integer"
"type": "number"
},
"private": {
"description": "If true, interactions with this object should not be broadcasted to other clients, but rather sent on private topics",
"type": "boolean",
"default": false
},
"program_id": {
"description": "The program_id on private program topics that interactions to be directed to, if the private flag is set true. Ignored if private flag is false.",
"type": "string"
}
}
}
31 changes: 23 additions & 8 deletions build/schemas/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,42 @@
"properties": {
"data": {
"properties": {
"source": {
"title": "Source ID",
"description": "The `object_id` of event origination. e.g camera or client program connection id.",
"target": {
"description": "The `object_id` of event destination.",
"type": "string"
},
"position": {
"targetPosition": {
"description": "The event destination position in 3D.",
"format": "grid",
"$ref": "#/definitions/vector3",
"title": "Position"
"$ref": "#/definitions/vector3"
},
"clickPos": {
"originPosition": {
"description": "The event origination position in 3D.",
"format": "grid",
"$ref": "#/definitions/vector3",
"title": "Click Position",
"default": {
"x": 0,
"y": 1.6,
"z": 0
}
},
"source": {
"title": "DEPRECATED (source)",
"description": "DEPRECATED: data.source is deprecated for clientEvent, use data.target instead.",
"type": "string",
"deprecated": true
},
"position": {
"title": "DEPRECATED (position)",
"description": "DEPRECATED: data.position is deprecated for clientEvent, use data.targetPosition instead.",
"type": "object",
"deprecated": true
},
"clickPos": {
"title": "DEPRECATED (clickPos)",
"description": "DEPRECATED: data.clickPos is deprecated for clientEvent, use data.originPosition instead.",
"type": "object",
"deprecated": true
}
},
"title": "Event Data",
Expand Down
2 changes: 1 addition & 1 deletion files/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function getStorePath() {
}

window.addEventListener('onauth', async (e) => {
await ARENAAUTH.makeUserRequest('GET', '/user/storelogin');
await ARENAAUTH.makeUserRequest('GET', '/user/v2/storelogin');
const authToken = ARENAAUTH.getCookie('auth');
loadStoreFront(authToken);
});
8 changes: 4 additions & 4 deletions navbar-old.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $(document).ready(() => {
// add page header
$('#header').load('/header-old.html', () => {
// update auth state in nav bar
fetch('/user/user_state')
fetch('/user/v2/user_state')
.then((response) => response.json())
.then((data) => {
window.auth = data;
Expand All @@ -16,7 +16,7 @@ $(document).ready(() => {
dropdownMenu.append('<li><a href="/conf/versions.html">Version</a></li>');
if (window.auth.authenticated) {
authDrop.html(`${window.auth.username} <b class='caret'></b>`);
dropdownMenu.append('<li><a href="/user/profile">Profile</a></li>');
dropdownMenu.append('<li><a href="/user/v2/profile">Profile</a></li>');
dropdownMenu.append('<li><a id="show_perms" href="#">Permissions</a></li>');
$('#show_perms').on('click', () => {
const frame = document.getElementsByTagName('iframe');
Expand All @@ -27,10 +27,10 @@ $(document).ready(() => {
alert('No MQTT permissions');
}
});
dropdownMenu.append('<li><a href="/user/logout">Logout</a></li>');
dropdownMenu.append('<li><a href="/user/v2/logout">Logout</a></li>');
} else {
authDrop.html('Login <b class="caret"></b>');
dropdownMenu.append('<li><a href="/user/login">Login</a></li>').on('click', (e) => {
dropdownMenu.append('<li><a href="/user/v2/login">Login</a></li>').on('click', (e) => {
localStorage.setItem('request_uri', window.location.href);
});
}
Expand Down
8 changes: 4 additions & 4 deletions navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $(document).ready(() => {
// add page header
$('#header').load('/header.html', () => {
// update auth state in nav bar
fetch('/user/user_state')
fetch('/user/v2/user_state')
.then((response) => response.json())
.then((data) => {
window.auth = data;
Expand All @@ -20,7 +20,7 @@ $(document).ready(() => {
dropdownMenu.append('<li><a class="dropdown-item" href="/conf/versions.html">Version</a></li>');
if (window.auth.authenticated) {
authDrop.html(window.auth.username);
dropdownMenu.append('<li><a class="dropdown-item" href="/user/profile">Profile</a></li>');
dropdownMenu.append('<li><a class="dropdown-item" href="/user/v2/profile">Profile</a></li>');
dropdownMenu.append('<li><a class="dropdown-item" id="show_perms" href="#">Permissions</a></li>');
$('#show_perms').on('click', () => {
const frame = document.getElementsByTagName('iframe');
Expand All @@ -31,11 +31,11 @@ $(document).ready(() => {
window.alert('No MQTT permissions');
}
});
dropdownMenu.append('<li><a class="dropdown-item" href="/user/logout">Logout</a></li>');
dropdownMenu.append('<li><a class="dropdown-item" href="/user/v2/logout">Logout</a></li>');
} else {
authDrop.html('Login');
dropdownMenu
.append('<li><a class="dropdown-item" href="/user/login">Login</a></li>')
.append('<li><a class="dropdown-item" href="/user/v2/login">Login</a></li>')
.on('click', (e) => {
localStorage.setItem('request_uri', window.location.href);
});
Expand Down
6 changes: 3 additions & 3 deletions scenes/scenes.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ window.addEventListener('onauth', async (e) => {
window.userSceneId = _e.target.value;
updateUriBuilderCheckboxes(true);
updateUserSceneUrlBox(`${window.location.origin}/${_e.target.value}`);
scenePermsLink.href = `${window.location.origin}/user/profile/scenes/${_e.target.value}`;
scenePermsLink.href = `${window.location.origin}/user/v2/profile/scenes/${_e.target.value}`;
deleteUserSceneBtn.value = _e.target.value;
toggleUserSceneButtons(true);
} else {
Expand Down Expand Up @@ -229,7 +229,7 @@ window.addEventListener('onauth', async (e) => {
deleteUserSceneBtn.addEventListener('click', () => {
if (confirm(`Are you sure you want to delete ${deleteUserSceneBtn.value}?`)) {
const deletes = [
axios.delete(`/user/scenes/${deleteUserSceneBtn.value}`, {
axios.delete(`/user/v2/scenes/${deleteUserSceneBtn.value}`, {
withCredentials: true,
}),
axios.delete(`/persist/${deleteUserSceneBtn.value}`),
Expand Down Expand Up @@ -327,7 +327,7 @@ window.addEventListener('onauth', async (e) => {
// my_scenes may include 'public' namespaces for staff
// my_scenes may include other editor namespaces that have been granted
axios
.get('/user/my_scenes', {
.get('/user/v2/my_scenes', {
withCredentials: true,
})
.then((res) => {
Expand Down
4 changes: 2 additions & 2 deletions screenshare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ function onConnectionSuccess() {
});

conference.setDisplayName(
`${(+new Date()).toString(36)} ${window.params.screenSharePrefix}_${window.params.camName}`
`${(+new Date()).toString(36)} ${window.params.screenSharePrefix}_${window.params.idTag}`
);
conference.setLocalParticipantProperty('screenshareDispName', window.params.displayName);
conference.setLocalParticipantProperty('screenshareCamName', window.params.camName);
conference.setLocalParticipantProperty('screenshareidTag', window.params.idTag);
conference.setLocalParticipantProperty('screenshareObjIds', window.params.objectIds);

conference.join();
Expand Down
Loading