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

Hubs rooms don't load #26097

Open
jdm opened this issue Apr 2, 2020 · 22 comments
Open

Hubs rooms don't load #26097

jdm opened this issue Apr 2, 2020 · 22 comments
Labels

Comments

@jdm
Copy link
Member

@jdm jdm commented Apr 2, 2020

Trying to load http://hubs.mozilla.com/mB8Wn7L/talkative-simplistic-sphere

Recommended setup:

  • add debug=true to the query string of the URL to get useful debug info from various vendored libraries
  • run with ./mach run [url] --pref dom.gamepad.enabled --pref dom.svg.enabled --pref dom.webrtc.enabled --pref dom.canvas_capture.enabled --pref dom.webrtc.transceiver.enabled --userscripts=resources/user-agent-js
  • apply #26097 (comment) to resources/user-agent-js/00.example.js

To modify hubs for debugging:

  • run with --unminify-js once, then use --local-script-source=unminified-js/ and modify the appropriate scripts as needed, OR
  • clone https://github.com/mozilla/hubs/, run npm run dev, connect to https://localhost:8080/hub.html?hub_id=SjXspyZ (the room link on the default index page won't do what you want)
  • TODO: figure out how to modify npm dependencies when running the server locally

Known issues:

@jdm jdm added the B-meta label Apr 2, 2020
@jdm jdm added this to To do in Hubs support Apr 2, 2020
@Manishearth
Copy link
Member

@Manishearth Manishearth commented Apr 21, 2020

JS error getting navigator.gamepads

This might be something that needs to be fixed upstream in Hubs. However, I'm curious as to how much the Hubs folks are interested in supporting devices that have no gamepads, since you can't do as much.

@jdm
Copy link
Member Author

@jdm jdm commented Apr 21, 2020

They are interested in supporting the HoloLens.

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Apr 21, 2020

This will probably require UI changes on their side so that hololens' interaction patterns can work.

Once immersive-web/webxr#997 is resolved that will also probably trigger some change. We should wait for that to resolve and then open a dialogue with them.

@Manishearth

This comment was marked as outdated.

@jdm

This comment was marked as resolved.

@jdm

This comment was marked as resolved.

@jdm

This comment was marked as resolved.

@jdm

This comment was marked as outdated.

@Manishearth

This comment was marked as resolved.

@jdm

This comment was marked as outdated.

@jdm
Copy link
Member Author

@jdm jdm commented May 22, 2020

Screen Shot 2020-05-22 at 1 31 14 PM

With some judicious commenting in the Hubs source code, the following userscript, and a couple bug fixes, we can successfully render the 3d observer view!

window.MediaDevices.prototype.enumerateDevices = function() {
    return Promise.resolve([]);
};
@jdm
Copy link
Member Author

@jdm jdm commented May 22, 2020

@Manishearth
Copy link
Member

@Manishearth Manishearth commented May 25, 2020

Filed servo/media#342 , servo/media#343 for the media element stuff

@jdm

This comment was marked as off-topic.

@jdm
Copy link
Member Author

@jdm jdm commented Jun 11, 2020

With the latest user script revision from the servo/hubs checkpoint branch, and the latest userscript from #26097 (comment), I am able to complete the UI flow to enter the room. I can't move around with the keyboard; it's not yet clear if that's because the data channels are totally fake or the correct key event listeners aren't being triggered.

@jdm
Copy link
Member Author

@jdm jdm commented Jun 12, 2020

With #26899 and #26880 fixed, movement works as expected.

bors-servo added a commit that referenced this issue Jul 2, 2020
Implement MediaStreamAudioDestinationNode, MediaStreamAudioSourceNode, MediaStreamTrackAudioSourceNode

Progress in #26097

This is a draft since we need the data channels stuff to land first

(also I need to make sure we're passing WPT)
bors-servo added a commit that referenced this issue Jul 2, 2020
Implement MediaStreamAudioDestinationNode, MediaStreamAudioSourceNode, MediaStreamTrackAudioSourceNode

Progress in #26097

This is a draft since we need the data channels stuff to land first

(also I need to make sure we're passing WPT)
bors-servo added a commit that referenced this issue Jul 2, 2020
Implement MediaStreamAudioDestinationNode, MediaStreamAudioSourceNode, MediaStreamTrackAudioSourceNode

Progress in #26097

This is a draft since we need the data channels stuff to land first

(also I need to make sure we're passing WPT)
bors-servo added a commit that referenced this issue Jul 3, 2020
Implement MediaStreamAudioDestinationNode, MediaStreamAudioSourceNode, MediaStreamTrackAudioSourceNode

Progress in #26097

This is a draft since we need the data channels stuff to land first

(also I need to make sure we're passing WPT)
@jdm
Copy link
Member Author

@jdm jdm commented Jul 7, 2020

With the latest Servo revision we can see the room contents for https://hubs.mozilla.com/mB8Wn7L/talkative-simplistic-sphere, but the lobby dialog never appears. I've rebased https://github.com/servo/hubs/tree/checkpoint against upstream Hubs and the lobby dialog appears, so it seems like servo/hubs@1e5f21c may still be commenting out some code that interrupts execution.

@jdm

This comment was marked as resolved.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 7, 2020

With the latest Servo revision, the only user-agent script stub that's still required is MediaDevices.enumerateDevices. Additionally, with my latest hubs-investigation servo branch, I am able to enter rooms on hubs.mozilla.org, rather than requiring a hacked-up local server!

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 28, 2020

So I can now get servo to enter a hubs room, with the magic incantation:L

./mach run -r "https://hubs.mozilla.com/$ROOM_ID?no_force_webvr&vr_entry_type=2d_now --pref dom.gamepad.enabled --pref dom.svg.enabled --pref dom.webrtc.enabled --pref dom.canvas_capture.enabled --pref dom.webrtc.transceiver.enabled"

The URL parameters are the key, they are:

  • no_force_webvr which gets hubs to use WebXR rather than WebVR
  • vr_entry_type=2d_now goes straight into the room, bypassing the avatar and audio dialogs.

There is also vr_entry_type=vr_now but at the moment that will cause a security error, since there was no user intent. We could add a pref to indicate user intent, in which case we could enter hubs directly.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 28, 2020

#27429 adds a pref to indicate user intent, which allows entering a hubs room in webxr.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 30, 2020

#27456 is the changes needed to enter hubs rooms in the gstreamer plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Hubs support
  
To do
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.