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
References: https://mqtt.org/
Broker
instance in your app and use the information provided in your dashboard for arguments.
Dashboard Example
URL 2457aa93d1444b8cb0dd5d5891a3c3d6.s1.eu.hivemq.cloud
PORT(TLS) 8883
Client app credentials to authenticate with the server
Manage Cluster->Access Management->Add User & Password
USERNAME test.admin
PASSWORD P2ssword
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 CMSampleBuffer
to 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)
apiKey
shown provides basic (free) scopes for live streaming and video conference (future release) applications. delegate
is reserved for future use. Use nil
for now. loggingFlag
Set to true
to see detailed logs.
jointSession?.$sessionStatus
Use this to give feedback to users about the status of the session.jointSession?.$activeStreamers
This is a Set
of Streamer
. Use this to display active streamers on the network.
await jointSession?.configureClient()
configureClient()
will verify the API key first, then attempt connecting to the broker that you have configured.
Streamer
Is 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)
watching
Active streamer on the network.using
An instance of AVQueuePlayer
in your view.
1.1.0
Video chat, 1 on 1.1.2.0
Video conference.1.3.0
Live news type stream where the host can establish a link with 4? other participants and select which one gets the spotlight.2.0.0
On demand video streaming.link |
Stars: 0 |
Last commit: 3 weeks ago |
Supports database operations.
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics