Twilio Video SDK iOS 5.3.0
twilio-sdk-build
released this
07 Nov 17:16
·
12 commits
to Releases
since this release
This release consumes twilio-video-cpp-6.6.1.
5.3.0
- Programmable Video iOS SDK 5.3.0 [XCFramework] (checksum: 128e56119ce21d799777342eeedead6d73e52ae6d50ed8c57aadc9c353b76473
).
Enhancements
- Picture in Picture mode is now supported with the SDK. A new renderer
SampleBufferVideoView
is added for picture in picture support. In order for picture in picture to work on iOS 15+, your app must have com.apple.developer.avfoundation.multitasking-camera-access entitlement.
The following code, from our Twilio Video iOS App, illustrates implementing picture in picture using SampleBufferVideoView
:
class PictureInPictureViewController: UIViewController {
@IBOutlet weak var videoView: VideoView!
private var pipController: AVPictureInPictureController!
private var pipVideoCallViewController: AVPictureInPictureVideoCallViewController!
override func viewDidLoad() {
let sampleBufferVideoCallView = SampleBufferVideoView()
sampleBufferVideoCallView.contentMode = .scaleAspectFit
pipVideoCallViewController = AVPictureInPictureVideoCallViewController()
pipVideoCallViewController.preferredContentSize = CGSize(width: 1080, height: 1920)
pipVideoCallViewController.view.addSubview(sampleBufferVideoCallView)
sampleBufferVideoCallView.translatesAutoresizingMaskIntoConstraints = false
let constraints = [
sampleBufferVideoCallView.leadingAnchor.constraint(equalTo: pipVideoCallViewController.view.leadingAnchor),
sampleBufferVideoCallView.trailingAnchor.constraint(equalTo: pipVideoCallViewController.view.trailingAnchor),
sampleBufferVideoCallView.topAnchor.constraint(equalTo: pipVideoCallViewController.view.topAnchor),
sampleBufferVideoCallView.bottomAnchor.constraint(equalTo: pipVideoCallViewController.view.bottomAnchor)
]
NSLayoutConstraint.activate(constraints)
sampleBufferVideoCallView.bounds = pipVideoCallViewController.view.frame
let pipContentSource = AVPictureInPictureController.ContentSource(
activeVideoCallSourceView: videoView,
contentViewController: pipVideoCallViewController
)
pipController = AVPictureInPictureController(contentSource: pipContentSource)
pipController.canStartPictureInPictureAutomaticallyFromInline = true
pipController.delegate = self
}
}
Please note that the render hints are not supported in picture in picture mode except for the track switch on and off hints when the SampleBufferVideoView
renderer is added and removed from the RemoteVideoTrack
respectively. As a result when the app is in the background and in picture in picture mode, the displayed RemoteVideoTrack
will still be active (e.g Dominant Speaker track), consuming bandwidth, and it will have the default spatial dimension determined by the media server.
Known Issues
- Audio playback fails in some cases when running a simulator on a Mac Mini. #182
- Unpublishing and republishing a
LocalAudioTrack
orLocalVideoTrack
might not be seen by Participants. #34 - H.264 video might become corrupted after a network handoff. #147
- iOS devices do not support more than three H.264 encoders. Refer to #17 for suggested work arounds.
- Publishing H.264 video at greater than 1280x720 @ 30fps is not supported. If a failure occurs then no error is raised to the developer. [ISDK-1590]
Size Impact for 5.3.0
Architecture | Compressed Size | Uncompressed Size |
---|---|---|
Universal | 4.7 MB | 10.9 MB |
arm64 | 4.7 MB | 10.9 MB |