0

I tried using the following code from http://codethink.no-ip.org/wordpress/archives/673 then putting it into the The OpenTokHello sample app from OpenTok and it appears to not actually record the video as I thought it would.

I made the ScreenCaptureView the new "superview" of everything and then made sure that the video streaming views would be added to that view. And when I played the video, the place where the streaming video should've been, was blank.

Any ideas on what I'm doing wrong?

1 Answers1

1

Full disclosure: I wrote some of the OpenTok iOS SDK and work for TokBox.

The implementation of this ScreenCaptureView might not work with our SDK because all of our video rendering is done outside the context of UIView. You'd have to grab the rendering layer of the view in order to recover that part of the screen.

Depending on why you're trying to record the conversation, I recommend either

  1. Using screen capture in QuickTime and running your app in simulator (easier)
  2. Waiting for OpenTok archiving support on iOS which will be available in a few months (also easy, but not for the impatient)
  3. Capturing the rendering output of the subscriber from CoreGraphics (less easy)
wobbals
  • 364
  • 3
  • 8
  • Thanks for the reply. Do you know if you can at least just record just record one person in the video screen? – user1036272 Apr 23 '12 at 12:57
  • At this point, I'm not sure if it's possible; all the effort I put into the subscriber was to get the data _on_ the screen, rather than off. Take a look at the view property of a subscriber and inspect whether there is readable content on its layer. Be sure to do this inspection on the main thread! – wobbals Apr 24 '12 at 18:03
  • 1
    Follow up: I wrote up an example that uses the tactic described in (3) above. Publisher and Subscriber views can be rendered off the main window with a little bit of work with Core Graphics. Here is the blog post highlighting the important bits ([link](http://www.tokbox.com/blog/fun-with-core-graphics-in-ios/)) and the full example on GitHub ([link](https://github.com/wobbals/OpenTok-iOS-Facial-Recognition-Demo/blob/master/OpenTokHelloWorld/ViewController.m#L35)) – wobbals Jun 13 '12 at 20:49