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

Cannot re-assign section with WebRTC app to new space #271

Open
AdrianDAlessandro opened this issue Dec 1, 2023 · 0 comments
Open

Cannot re-assign section with WebRTC app to new space #271

AdrianDAlessandro opened this issue Dec 1, 2023 · 0 comments

Comments

@AdrianDAlessandro
Copy link

I've tried using the OVE-Core API endpoint /sections/{id} to change the space that an existing WebRTC app is in and it doesn't appear to move it successfully. Digging a little I was able to determine that the "state" parameter inside the app parameter does not get reflected in the result. Note that this is different from the "states" (plural) parameter which does indeed appear in the new section.

Current approach is along the lines of what is in this assign_sections function: https://github.com/ImperialCollegeLondon/gridlington-vis/blob/main/app/core_api.py#L66

It works perfectly fine with HTML apps.

Quickly outlining the steps:

  1. Get existing section details with: GET "/sections", params={"includeAppStates": True}
  • This returns the details with something like this when a session is running
{"id":1,"x":0,"y":0,"w":1920,"h":1080,"space":"LocalNine","app":{"url":"<base>/app/webrtc","state":"ScreenShare","states":{"load":{"sessionId":"<sessionid>","maxSessions":8,"randomSessionId":true,"sessionActive":true,"controllerId":"<controllerid>"}}}}
  • Note that there is the "state" parameter as well as the "states" one - this is required to define a section as a WebRTC app when setting it up
  1. Then POST to "sections/{id}" with the data contained in what was received from the previous GET request but changing the "space" value.
  • This works mostly, it sends all of the data but the "state" parameter is gone and the space doesn't show the webrtc app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant