Language: Swift 5.6 Compiler: 15.4 Dependencies: MQTTClient, SocketRocket
Sample App: https://github.com/aibo-cora/meliora
MQTTClient v0.15.3 https://github.com/novastone-media/MQTT-Client-Framework
SocketRocket v0.6.0 https://github.com/facebookincubator/SocketRocket
Brokerinstance in your app and use the information provided in your dashboard for arguments.
Client app credentials to authenticate with the server
Manage Cluster->Access Management->Add User & Password
let broker = Broker(ip: "2457aa93d1444b8cb0dd5d5891a3c3d6.s1.eu.hivemq.cloud", port: 8883, username: "test.admin", password: "P2ssword")
lazy var components = CaptureComponents(captureSession: CameraManager.shared.session, delegate: FrameSupplier.shared)
captureSession Configure an
AVCaptureSession instance by adding video input.
Joint takes care of the audio input and AV output, so you do not need to do anything here. Do not install taps on the microphone in your app, it might result in unexpected behavior. Adding video output is also not needed. The framework will remove it and add another one that is configured to the required specs.
delegate Conform an object supplying
CVPixelBuffer for your video preview to
VideoDisplayDelegate. This object will be receiving sample buffers from the AV capture session you configured. If you are using
SwiftUI, make sure you setup a chain of modifiers to convert
Image. Refer to the sample app for a way to do it.
The framework does not configure the
AVAudioSession singleton and relies on the OS to make it active and grant the necessary category at runtime. The side effects are unknown at this point if you decide to configure it.
jointSession = JointSession(apiKey: "C!9X5&/WPuU(6pp5", broker: broker, captureComponents: components, delegate: nil, loggingFlag: false)
apiKeyshown provides basic (free) scopes for live streaming and video conference (future release) applications.
delegateis reserved for future use. Use
trueto see detailed logs.
jointSession?.$sessionStatusUse this to give feedback to users about the status of the session.
jointSession?.$activeStreamersThis is a
Streamer. Use this to display active streamers on the network.
configureClient()will verify the API key first, then attempt connecting to the broker that you have configured.
StreamerIs a unique entity on your network. An object of this type should have a name, email and channel associated with it.
jointSession?.startSession(streamer: Streamer())Start Live session.
jointSession?.stopSession()Stop Live session.
jointSession?.configurePlayer(watching: streamer, using: player)
watchingActive streamer on the network.
usingAn instance of
AVQueuePlayerin your view.
1.1.0Video chat, 1 on 1.
1.3.0Live news type stream where the host can establish a link with 4? other participants and select which one gets the spotlight.
2.0.0On demand video streaming.