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

Expose <video> element #44

Closed
franzfloresjr opened this issue Mar 27, 2019 · 3 comments
Closed

Expose <video> element #44

franzfloresjr opened this issue Mar 27, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@franzfloresjr
Copy link

franzfloresjr commented Mar 27, 2019

Hi! This library is great.

I was wondering if the video element could be made public. In that way i can pass it to other libraries like face-api.js

// access video element
const video = this.webcam.video;
// pass it as input to face-api.js
from(faceapi.detectSingleFace(video)).subscribe((result) => { })

It would be great rather querying the element through document.
Thanks.

@basst314
Copy link
Owner

basst314 commented Mar 29, 2019

Hi @franz1023dfjr,

thank you for using this library!

The idea of exposing the video element sounds interesting. I will take a look at it and the face-api lib that you mentioned.
Is this the lib? https://github.com/justadudewhohacks/face-api.js?files=1

Am I correct in the assumption that you're currently able to use a workaround by querying the element through document?

Cheers

@basst314 basst314 added the enhancement New feature or request label Mar 29, 2019
@franzfloresjr
Copy link
Author

franzfloresjr commented Mar 29, 2019

Hi @basst314 ,

Yes. That's the lib I'm talking about and your library makes my work faster since i don't have to code setting up the camera. I greatly appreciate it.

Your assumption is correct. What I'm doing right now is:
const video = document.querySelector('#webcam video')

Not much of a hassle but I rather use @ViewChild() decorator of angular then access its properties 😁 .

Thanks.

basst314 added a commit that referenced this issue Jun 16, 2019
Expose native video element (#44)
@basst314
Copy link
Owner

Hi @franz1023dfjr,

I released a new version (0.2.4) which has a new method to access the native video element. Checkout the nativeVideoElement() method on the webcam component.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants