5

I am wondering how I could grab the screenshot of a Subscriber's video feed. I see a Stream object representing the video stream is passed into the Subscriber's constructor, but I have no idea how to take advantage using it to convert current frame into Bitmap. And idea ?

Thanks in advance !

cyc115
  • 635
  • 2
  • 14
  • 27

1 Answers1

3

To get a base64 encoding of the subscriber image, simply call subscriber.getImgData(). Documentation for javascript library here!

If you want to capture video on iOS devices, download the SDK and look in the samples folder for Live-Photo-Capture sample app. The example uses publisher as a demo but you can follow the same reasoning to build that for subscribers.

If you want to capture subscriber on Android devices, checkout the custom video capturer in the android samples

songz
  • 2,082
  • 1
  • 14
  • 18
  • Thanks for the tip! Custom video capturer is exactly what I am going for :) – cyc115 Aug 05 '14 at 18:59
  • 2
    no problem! To add to android, implementing previewCallback and extending BaseVideoCapturer will trigger an event callback called `onPreviewFrame` that has the data of that frame. you can then convert that data into image. – songz Aug 06 '14 at 00:16