Livestream
The UIKit now supports live stream posts so you can create and watch live streams.
Installation
To enable live stream functionalities easily, we’ve provided AmityUIKitLiveStream
, which is built on top of Social Plus UIKit and Social Plus SDK.
The plugin provides:
LiveStreamBroadcastViewController
to create and broadcast live stream postsLiveStreamPlayerViewController
to watch live streams
The live stream plugin can be installed via Swift Package Manager with these steps:
In Xcode, select File > Swift Packages > Add Package Dependency.
Specify the Repository: https://github.com/AmityCo/Amity-Social-Cloud-UIKit-LiveStream-iOS-SwiftPM.
Select Up to Next Major, then click Next.
Select
AmityUIKitLiveStream, then
click Finish.
After successfully installing the plugin, you must override the live stream behaviors with these steps:
Create
AmityEventHandler
subclass, and override live stream functions.Set the custom event handler for
Social Plus UIKit
.
App Permissions
LiveStreamBroadcastViewController
requires these permissions:
Camera Permission - to broadcast live stream video
Microphone Permission - to broadcast live stream audio
After LiveStreamBroadcastViewController
is presented, it will prompt to ask permission automatically if needed. You must include these permission keys in your app’s Info.plist file:
NSCameraUsageDescription
NSMicrophoneUsageDescription
Last updated