Lee Probert Lee Probert - 1 year ago 118
iOS Question

How can I render a TokBox Screen Share stream in aspectFit

I have a TokBox iOS app that renders a Screen Share stream for the user. The video stream is cropped if it is larger than the view. It is set by default to an aspect FILL.

I cannot find a way to change this to aspect FIT. Does anyone know if this is possible on TokBox iOS?

Answer Source

For my case, this will do the trick, self.subscriber is an instance of OTSubscriber:

self.subscriber.viewScaleBehavior = OTVideoViewScaleBehaviorFit;;

You can also check this repo out: https://github.com/opentok/screensharing-annotation-acc-pack

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download