ngx-webcam icon indicating copy to clipboard operation
ngx-webcam copied to clipboard

Video Support added for WebM MediaType

Open Reda1000 opened this issue 6 years ago • 3 comments

I have used this library a while ago and required video support + rendering in browser now. So i added this functionality through (re)start, finish and pause / resume buttons / functionality. It doesnt include audio.

I have used an additional dependency called whammy which just supports video/webm and image/webp-Frames so far. I tested manually and automatically by three additional scenarious that run successful:

  • start and finish
  • start, restart and finish
  • play, pause, resume and finish

User need to add whammy.js in angular.json for video support which seems a bit odd - i didnt figure out a nicer way.

Let me know how to improve code quality to meet your requirements.

Thanks for your work.

Reda1000 avatar Jun 20 '19 22:06 Reda1000

Hi @Reda1000,

Thanks for raising this PR. I will look into it when I have some time.

basst314 avatar Jun 25 '19 08:06 basst314

It would be really cool if there would be audio as well.

What We are looking for is users capturing video with audio (very important) and submitting it.
Later, a REST service could provide the content for replay.

vikreinok avatar Nov 14 '19 14:11 vikreinok

@vikreinok you have similar task like i had. I prepared video support but had to use whammy - webm encoder - which breaks build. I only also was partially happy cause the encoded frame rate sometimes went "out of sync" - leading to faster or slower playback than normal.

In the end it fulfilled the tasks need so i did not tinker more on this solution - on implementation I made experience that most commonly a server is ised for doing the encoding instead of browser.

Maybe @basst314 could share his thoughts if video+audio encoding should be done at clientside? In this case I could try working out better solution + better build handling.

Reda1000 avatar Nov 19 '19 00:11 Reda1000