-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Why is AR.js waitin for domElement.videoWidth before adding video element to DOM? #670
Comments
hi! |
ongeo-dev
pushed a commit
to ongeo-dev/AR.js
that referenced
this issue
Dec 10, 2019
It seems not to be necessary to wait for the stream, so it could be shown directly. Also added some missing semicolons.
Merged
PR is on the way... |
ongeo-dev
pushed a commit
to ongeo-dev/AR.js
that referenced
this issue
Dec 10, 2019
It seems not to be necessary to wait for the stream, so it could be shown directly. Also added some missing semicolons.
nicolocarpignoli
pushed a commit
that referenced
this issue
Feb 3, 2020
It seems not to be necessary to wait for the stream, so it could be shown directly. Also added some missing semicolons.
@smuddy Do you have a demo repo? I'm working on iosrtc+AR.js too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Because iOS does not allow getUserMedia in third party apps using the WkWebView (p.e. Cordova) there is a native mock that hooks the
navigator.getUserMedia
function and provides the camera stream.Unfortunately the property
element.videoWidth
is not set.So my questsion is: why does AR.js wait for the stream inisitialisation inside
ARjs.Source.protoype._initSourceWebcam
? If I directly show the video element after assigning the stream, is see no side effects. Imho there is no need to wait.To Reproduce
Expected behavior
App should initialize AR.js and show the camera image.
But it waits with an interval for
element.videoWidth
as trigger for adding video element to the DOM.Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: