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

Examples: Remove FPS workaround in webxr_vr_video. #19907

Merged
merged 2 commits into from Dec 17, 2020
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jul 22, 2020

Fixed #19880.
Fixed #13379.

Thanks to requestVideoFrameCallback(), the workaround from #13470 should not be necessary anymore.

This might affect the example in Firefox Reality however Chromium based browsers (like Oculus Browser) should already support it. Testing...

https://raw.githack.com/Mugen87/three.js/95d79137f9e281c54ba637359c8e132ca8c011ca/examples/webxr_vr_video.html

@Mugen87 Mugen87 marked this pull request as draft July 22, 2020 09:52
@mrdoob mrdoob added this to the r119 milestone Jul 22, 2020
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 22, 2020

Um, it seems there is an issue with Oculus Browser (version 10.2.0.6.111....). requestVideoFrameCallback() is in general supported and called when you view the example in non-VR mode. But when presenting, the callback is not executed anymore. Maybe a bug?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 22, 2020

Just for the record: Firefox Reality does not yet support requestVideoFrameCallback().

@mrdoob
Copy link
Owner

mrdoob commented Jul 22, 2020

/ping @cabanier

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 22, 2020

Um, it seems there is an issue with Oculus Browser (version 10.2.0.6.111....). requestVideoFrameCallback() is in general supported and called when you view the example in non-VR mode. But when presenting, the callback is not executed anymore.

Oh, it seems the same is true for Chrome on Android. I've tested with a Pixel 1 and Daydream and the behavior is the same. requestVideoFrameCallback() is not called when presenting.

@mrdoob
Copy link
Owner

mrdoob commented Jul 22, 2020

/ping @toji

@cabanier
Copy link
Contributor

I logged a bug on this last week: https://bugs.chromium.org/p/chromium/issues/detail?id=1107578
Hit the star button so the bug gets more traction.

I agree that this feature would be great for WebXR because it allows you to only pick up the video frames that changed.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 22, 2020

Hit the star button so the bug gets more traction.

Done! 😊

@mrdoob mrdoob modified the milestones: r119, rXXX Jul 24, 2020
@usefulthink
Copy link
Contributor

usefulthink commented Oct 1, 2020

Any chance to create a workaround so we can use VideoTexture in webxr-projects? Maybe add a flag forceUpdate or something to the VideoTexture.update() method that is set by the renderer when a xr-session is running?

EDIT: reading https://crbug.com/1107578 this should be fixed in chromium soon, so maybe not worth it..

@cabanier
Copy link
Contributor

cabanier commented Oct 1, 2020

https://bugs.chromium.org/p/chromium/issues/detail?id=1107578 was submitted.
Starting in Chrome 87, requestVideoFrameCallback should work as expected.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Oct 1, 2020

I'll mark the PR as "Ready for Review" when Chrome 87 lands in production and Oculus Browser uses a respective Chromium build.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Dec 17, 2020

Tested the updated example today on a Quest with latest Oculus Browser (based on Chromium 87.0.4280.66) and it works fine now. Changing the PR status to Ready for review 🎉 .

@Mugen87 Mugen87 marked this pull request as ready for review December 17, 2020 18:38
@mrdoob mrdoob modified the milestones: rXXX, r124 Dec 17, 2020
@mrdoob mrdoob merged commit c953c9f into mrdoob:dev Dec 17, 2020
@mrdoob
Copy link
Owner

mrdoob commented Dec 17, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

Video examples get errors VideoTexture updating at 60-90fps
4 participants