Lee Probert Lee Probert - 8 months ago 41
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?


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