AckerApple / ack-angular-webcam

MIT License
37 stars 19 forks source link

Add ability to set ideal width and height on media #39

Closed tthtrifork closed 6 years ago

tthtrifork commented 6 years ago

When getting MediaTracks it's possible to set "min", "max", "exact" or "ideal" dimentions. Setting "ideal" dimentions won't break source but lets the developer adjust the video size.

AckerApple commented 6 years ago

This functionality you are requesting rather seems to belong in the options object

I believe a typing for it needs to be apart of the following code here: https://github.com/AckerApple/ack-angular-webcam/blob/master/src/videoHelp.ts#L15

As this pull request is, I will not be merging it. However I think the request is a valid one. It just needs to be worked in more appropriately, I feel.

Any thoughts? Perhaps an opposing point of view? Your pull request does not seem to include min, max, exact. It just seems to only address ideal.

AckerApple commented 6 years ago

Link to self on this topic : https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia

tthtrifork commented 6 years ago

I don't have an oposing point of view, I get why you'd like it done that way. So I just did a little refactoring which now makes use of "MediaTrackConstraints" in the options interface and refers them in the component.

AckerApple commented 6 years ago

Your updated pull request looks good to me. I will merge, update README, and publish today.

Thank you much for the pull request. You’ve instantly jumped to the top of my list of favorite people.

Special request, please update github profile icon to real picture. I’d like to remember you beyond a follow button.

tthtrifork commented 6 years ago

As per request I've updated my profile icon to a real picture :-) Thanks for the library - it have saved me a lot of time already :+1:

AckerApple commented 6 years ago

Super dope soulful way to be man. I will get your merge expedited today.

Great to be on the same team

AckerApple commented 6 years ago

I have updated the code to 1.9.1

This package has always had options.video which is a boolean or your width height definitions.

Thus, for all the work you and I did, all we merely did was data type and document the functionality.

The demo page now has video width height controls to demonstrate just this.

DO NOT use options.videoOptions use options.video as seen here

tthtrifork commented 6 years ago

Hi Acker,

I've done the changes needed to use version 1.9.1 but it remains unreleased. It would be awesome to have that feature before our next deadline.

AckerApple commented 6 years ago

I didn’t know it wasn’t published. Thanks for the heads up.

AckerApple commented 6 years ago

Will publish within three hours

AckerApple commented 6 years ago

You are good to go. Apologize for the hold up, pushed but forgot to publish