0

In html5, I want to be able to grab a live feed from the phone camera and display it on the page with an overlay on top, it can be another div tag. But at the same time, be able to extract exif data from the image frames coming from the live feed using https://github.com/exif-js/exif-js.

Does anyone know if this is possible to do?

Thanks

Mosh Feu
  • 28,354
  • 16
  • 88
  • 135
omega
  • 40,311
  • 81
  • 251
  • 474
  • You can try [rtchub](https://rtchub.com) but it works only for Android – Plamen Peshev Jul 16 '16 at 11:24
  • Yes it is possible (except there's no exif data from cameras), but a list of requirements is not a good question on SO. – jib Jul 16 '16 at 20:59
  • @jib how is that possible? i don't think that you have access to the live camera of a mobile phone (at least in ios right now) – FirePanther Feb 13 '17 at 21:08
  • @FirePanther [It's possible](http://stackoverflow.com/a/32364912/918910) on Android, not iOS. – jib Feb 14 '17 at 02:38

1 Answers1

0

try this

@ViewChild('video') video:any; 
// note that "#video" is the name of the template variable in the video element

ngAfterViewInit() {
  let _video=this.video.nativeElement;
  if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
    navigator.mediaDevices.getUserMedia({ video: true })
                          .then(stream => {
                            _video.src = window.URL.createObjectURL(stream);
                            _video.play();
                          })
  }
}

https://stackoverflow.com/a/40381774/3785349

Kofi Sammie
  • 3,237
  • 1
  • 17
  • 17