Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestone 22 signalling 211 beta #1489

Merged
merged 120 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
7204360
POC3 iOS get-stared changes.
nirm2009 Aug 16, 2023
1826028
POC3 iOS call-quality changes.
nirm2009 Aug 17, 2023
eeef267
Updated doc structure
saudsami Aug 18, 2023
a77a9f3
Update
saudsami Aug 18, 2023
60762a8
Updates
saudsami Aug 19, 2023
eb2cd5b
call quality updates
saudsami Aug 21, 2023
06a8c83
Updates
saudsami Aug 21, 2023
54f5abe
POC3 iOS authentication changes.
nirm2009 Aug 22, 2023
5546c90
POC3 macOS get-started, call-quality, authentication changes.
nirm2009 Aug 23, 2023
e98fc8a
Merge branch 'milestone-19-video-sdk-for-react-web' of github.com:Ago…
billy-the-fish Aug 24, 2023
3c99eea
Merge branch 'milestone-19-video-sdk-for-react-web' of github.com:Ago…
billy-the-fish Aug 24, 2023
04a916a
Start merging all the PRs for POC3
billy-the-fish Aug 24, 2023
3d201ea
Start merging all the PRs for POC3
billy-the-fish Aug 24, 2023
772cc32
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Aug 24, 2023
c988e6d
Merge branch 'android-poc3-docs' of github.com:AgoraIO/Doc-Source-Pri…
billy-the-fish Aug 25, 2023
9e0d390
Merge the other projects.
billy-the-fish Aug 25, 2023
397843d
Updates
saudsami Aug 26, 2023
4b27e15
Merge the other projects.
billy-the-fish Aug 28, 2023
fe0ac88
Merge pull request #333 from AgoraIO/android-poc3-docs
billy-the-fish Aug 28, 2023
a9c5762
Update for new languages in real-time transcription
billy-the-fish Aug 28, 2023
0b73371
iOS macOS updates to match the latest code.
nirm2009 Aug 28, 2023
8db02ba
Merge branch 'poc3-ios-doc-updates' of https://github.com/AgoraIO/Doc…
nirm2009 Aug 28, 2023
284c207
Updates
saudsami Aug 29, 2023
bca1856
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Aug 29, 2023
dc27ddb
Update to GetStarted.
billy-the-fish Aug 29, 2023
b67bb8c
Authentification workflow.
billy-the-fish Aug 29, 2023
c40a3ea
Call quality updates.
billy-the-fish Aug 29, 2023
f92d454
Merge pull request #330 from AgoraIO/poc3-ios-doc-updates
billy-the-fish Aug 29, 2023
0df25b4
call quality doc updates
saudsami Aug 30, 2023
9181d62
Review updates
saudsami Aug 30, 2023
e8def35
Update
saudsami Aug 30, 2023
954e607
Pulled from the milestone branch
saudsami Aug 30, 2023
ae18063
doc structure
saudsami Aug 30, 2023
526016d
Updates
saudsami Aug 31, 2023
143fae3
Merge pull request #344 from AgoraIO/poc3-flutter-docs
billy-the-fish Aug 31, 2023
fb5bd52
reversed changes committed to the wrong branch
saudsami Sep 1, 2023
63e47c3
unity poc3
hussain-khalid Sep 4, 2023
70a25c3
update get started for vsdk poc3 web
Kishan-Dhakan Sep 5, 2023
381fc70
update vsdk secure auth docs
Kishan-Dhakan Sep 5, 2023
8b085d6
get started
billy-the-fish Sep 5, 2023
a624796
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Sep 5, 2023
83b587a
Authentication guide.
billy-the-fish Sep 5, 2023
6f6b6b5
update call quality doc
Kishan-Dhakan Sep 5, 2023
afa2016
Call quality
billy-the-fish Sep 5, 2023
7243761
Merge pull request #355 from AgoraIO/Unity-poc3-docs
billy-the-fish Sep 5, 2023
732b4a2
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Sep 5, 2023
2d636f9
Windows POC3 Code Doc
Pankajg123 Sep 5, 2023
2803ba5
Updated for call quality
Pankajg123 Sep 6, 2023
10d638a
POC3 iOS macOS doc updates.
nirm2009 Sep 6, 2023
757f164
Get started.
billy-the-fish Sep 6, 2023
a25f582
Merge branch 'milestone-21-new-get-started-architecture' into poc3-io…
nirm2009 Sep 6, 2023
1a8fe04
Beta release notes
atovpeko Sep 7, 2023
4ae8719
Call quality.
billy-the-fish Sep 7, 2023
cce383b
Changed extension name to variable
atovpeko Sep 7, 2023
c6cc9e7
Updates
saudsami Sep 7, 2023
63a7f84
Call quality.
billy-the-fish Sep 7, 2023
d734371
Merge pull request #357 from AgoraIO/vsdk-web-poc3
billy-the-fish Sep 7, 2023
4931a67
Updates
saudsami Sep 7, 2023
093dc66
Updates
saudsami Sep 8, 2023
9c6fe92
Added link to super clarity docs
atovpeko Sep 8, 2023
96ede64
Updates
saudsami Sep 9, 2023
e145175
revert
saudsami Sep 9, 2023
4cf3d27
implement Secure Authentication Server POC3 To DOC
Pankajg123 Sep 12, 2023
6926f62
Merge branch 'staging' of github.com:AgoraIO/Doc-Source-Private into …
billy-the-fish Sep 13, 2023
6555b57
Get started.
billy-the-fish Sep 14, 2023
b2c8dfe
Authentication guide.
billy-the-fish Sep 14, 2023
ece188c
Added a bug fix
atovpeko Sep 15, 2023
a36fd36
Call quality.
billy-the-fish Sep 15, 2023
4fd1160
Merge pull request #366 from AgoraIO/POC3_Windows_get_started
billy-the-fish Sep 15, 2023
e5b9227
Update shared/extensions-marketplace/_superclarity.mdx
saudsami Sep 16, 2023
c5c0013
Update shared/extensions-marketplace/_superclarity.mdx
saudsami Sep 16, 2023
86929ff
Update shared/extensions-marketplace/_superclarity.mdx
saudsami Sep 16, 2023
56496e1
Update extensions-marketplace/develop/integrate/superclarity.mdx
saudsami Sep 16, 2023
779d090
Merge pull request #374 from AgoraIO/340-release-notes-beta
atovpeko Sep 17, 2023
c2e165a
Merge pull request #390 from AgoraIO/341-add-a-page-for-the-super-cla…
atovpeko Sep 17, 2023
6251c0a
add poc3 encryption doc
Kishan-Dhakan Sep 18, 2023
c10b465
add e2e section
Kishan-Dhakan Sep 18, 2023
416e0be
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Sep 18, 2023
71e60f3
Review.
billy-the-fish Sep 18, 2023
8e16886
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Sep 18, 2023
324ba53
Update on review.
billy-the-fish Sep 18, 2023
3e9b590
Merge pull request #368 from AgoraIO/poc3-ios-doc-updates
billy-the-fish Sep 18, 2023
b0d641a
Update on review.
billy-the-fish Sep 18, 2023
22a3884
Merge pull request #414 from AgoraIO/e2e-doc
atovpeko Sep 18, 2023
78bc429
remove rtc name
Kishan-Dhakan Sep 19, 2023
0f57a68
Removed the fixed issue
atovpeko Sep 19, 2023
f33fa65
Merge branch 'staging' of github.com:AgoraIO/Doc-Source-Private into …
billy-the-fish Sep 19, 2023
16e804a
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Sep 19, 2023
c2b46ac
Merge branch 'staging' of github.com:AgoraIO/Doc-Source-Private into …
billy-the-fish Sep 20, 2023
5c3a64f
react-native get-started
hussain-khalid Sep 20, 2023
5e67cbf
call quality
hussain-khalid Sep 20, 2023
ca592da
Update media stream encryption.
billy-the-fish Sep 21, 2023
6215446
Release note rephrase
atovpeko Sep 21, 2023
ed891a2
Merge remote-tracking branch 'origin/milestone34-video-sdk-for-web-41…
atovpeko Sep 21, 2023
2709df5
Merge pull request #423 from AgoraIO/fix-rtc-names
atovpeko Sep 21, 2023
6d83cea
Updates on review.
billy-the-fish Sep 22, 2023
dfc29cd
Merge pull request #435 from AgoraIO/react-native-poc3-get-started-an…
billy-the-fish Sep 22, 2023
01d8c7b
Merge branch 'staging' of github.com:AgoraIO/Doc-Source-Private into …
billy-the-fish Sep 22, 2023
3a61732
Updates on review.
billy-the-fish Sep 25, 2023
b94b24a
Merge branch 'staging' of github.com:AgoraIO/Doc-Source-Private into …
billy-the-fish Sep 25, 2023
ca203a5
Merge branch 'milestone34-video-sdk-for-web-4190-beta' of github.com:…
billy-the-fish Sep 25, 2023
edf2c07
Updates on merge.
billy-the-fish Sep 25, 2023
1f6d5cb
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Sep 25, 2023
db554b1
Video SDK v4.19.0 for Web and Poc3 docs for all platforms except elec…
billy-the-fish Sep 25, 2023
c242481
Update to match ReactNative implementation with new renew token.
billy-the-fish Sep 27, 2023
f8e0585
Reduce veriables in docs, have the correct config for ios and macos c…
billy-the-fish Sep 27, 2023
a3a684f
Remove onClientRoleChanged. I can't find it in the api.
billy-the-fish Sep 27, 2023
7ad52ce
Merge branch 'milestone-19-video-sdk-for-react-web' of github.com:Ago…
billy-the-fish Sep 27, 2023
e78c788
Merge branch 'milestone-21-new-get-started-architecture' of github.co…
billy-the-fish Sep 27, 2023
8f0222a
2.1.5 release notes added
atovpeko Sep 29, 2023
f938bfe
459 add a presence doc for signaling web (#494)
saudsami Oct 3, 2023
0086061
presence doc description
saudsami Oct 3, 2023
02aebc0
Updated the SIgnaling storage diagram (#496)
saudsami Oct 3, 2023
19311ea
Signaling FAQ integration (#632)
saudsami Oct 6, 2023
5b5ef25
Signaling web api reference update (#578)
saudsami Oct 6, 2023
32ed5af
Merge branch 'beta' into milestone-22-signalling-211
Kishan-Dhakan Oct 17, 2023
fbeb36f
update date
Kishan-Dhakan Oct 17, 2023
8bae7e8
merge
Kishan-Dhakan Oct 17, 2023
58ffbb5
fix
Kishan-Dhakan Oct 17, 2023
86b2660
update prerequisites
Kishan-Dhakan Oct 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 11 additions & 79 deletions assets/code/video-sdk/authentication-workflow/swift/fetch-token.mdx
Original file line number Diff line number Diff line change
@@ -1,86 +1,18 @@

<PlatformWrapper platform="macos">
``` swift
func fetchToken() -> Bool {
// Construct the endpoint URL
channelName = channelTextField.stringValue ?? ""
if channelName.isEmpty {
showMessage(title: "Channel", text: "Please set a channel to join")
return false
}
guard let tokenServerURL = URL(string: "\(serverUrl)/rtc/\(channelName)/\(userRole.rawValue)/uid/\(userID)/?expiry=\(tokenExpireTime)") else {
return false
}
/// Semaphore waits for the request to complete, before returning the token.
let semaphore = DispatchSemaphore(value: 0)
var request = URLRequest(url: tokenServerURL, timeoutInterval: 10)
request.httpMethod = "GET"
func fetchToken(
from tokenUrl: String, channel: String,
role: AgoraClientRole, userId: UInt = 0
) async throws -> String? {
guard !tokenUrl.isEmpty else { return nil }

// Construct the GET request
let task = URLSession.shared.dataTask(with: request) { data, response, err in
defer {
// Signal that the request has completed
semaphore.signal()
}
guard let data = data else {
// No data, no token
return
}
let responseJSON = try? JSONSerialization.jsonObject(with: data, options: [])
if let responseDict = responseJSON as? [String: Any], let tokenToReturn = responseDict["rtcToken"] as? String {
// Key "rtcToken" found in response, assigning to tokenToReturn
self.token = tokenToReturn
}
}
guard let tokenServerURL = URL(
string: "\(tokenUrl)/rtc/\(channel)/\(role.rawValue)/uid/\(userId)/"
) else { return nil }

task.resume()
let (data, _) = try await URLSession.shared.data(from: tokenServerURL)
let tokenResponse = try JSONDecoder().decode(TokenResponse.self, from: data)

// Waiting for signal found inside the GET request handler
semaphore.wait()
return true
return tokenResponse.rtcToken
}
```
</PlatformWrapper>

<PlatformWrapper platform="ios">
``` swift
func fetchToken() -> Bool {
// Construct the endpoint URL
channelName = channelTextField.text ?? ""
if channelName.isEmpty {
showMessage(title: "Channel", text: "Please set a channel to join")
return false
}
guard let tokenServerURL = URL(string: "\(serverUrl)/rtc/\(channelName)/\(userRole.rawValue)/uid/\(userID)/?expiry=\(tokenExpireTime)") else {
return false
}
/// Semaphore waits for the request to complete, before returning the token.
let semaphore = DispatchSemaphore(value: 0)
var request = URLRequest(url: tokenServerURL, timeoutInterval: 10)
request.httpMethod = "GET"

// Construct the GET request
let task = URLSession.shared.dataTask(with: request) { data, response, err in
defer {
// Signal that the request has completed
semaphore.signal()
}
guard let data = data else {
// No data, no token
return
}
let responseJSON = try? JSONSerialization.jsonObject(with: data, options: [])
if let responseDict = responseJSON as? [String: Any], let tokenToReturn = responseDict["rtcToken"] as? String {
// Key "rtcToken" found in response, assigning to tokenToReturn
self.token = tokenToReturn
}
}

task.resume()

// Waiting for signal found inside the GET request handler
semaphore.wait()
return true
}
```
</PlatformWrapper>
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@

<PlatformWrapper platform="ios">

``` swift
// This method is specifically used by the sample app. If there is a tokenURL, it will attempt to retrieve a token from there.
internal func joinChannel(_ channel: String, uid: UInt? = nil) async -> Int32 {
let userId = uid ?? DocsAppConfig.shared.uid
var token = DocsAppConfig.shared.rtcToken
if !DocsAppConfig.shared.tokenUrl.isEmpty {
do {
token = try await self.fetchToken(
from: DocsAppConfig.shared.tokenUrl, channel: channel,
role: self.role, userId: userId
)
} catch {
print("token server fetch failed: \(error.localizedDescription)")
}
}
return self.joinChannel(channel, token: token, uid: userId, info: nil)
}

// Joins a channel, starting the connection to a session.
open func joinChannel(
_ channel: String, token: String? = nil, uid: UInt = 0, info: String? = nil
) async -> Int32 {
if await !AgoraManager.checkForPermissions() {
DispatchQueue.main.async {
self.label = """
Camera and microphone permissions were not granted.
Check your security settings and try again.
"""
}
return -3
}

return self.agoraEngine.joinChannel(
byToken: token, channelId: channel,
info: info, uid: uid
)
}
```

</PlatformWrapper>

<PlatformWrapper platform="macos">
``` swift
// This method is specifically used by the sample app. If there is a tokenURL, it will attempt to retrieve a token from there.
open func joinChannel(_ channel: String) async -> Int32 {
if let rtcToken = DocsAppConfig.shared.rtcToken, !rtcToken.isEmpty {
return self.joinChannel(
channel, token: DocsAppConfig.shared.rtcToken,
uid: DocsAppConfig.shared.uid, info: nil
)
}
var token: String?
if !DocsAppConfig.shared.tokenUrl.isEmpty {
do {
token = try await self.fetchToken(
from: DocsAppConfig.shared.tokenUrl, channel: channel, role: self.role
)
} catch {
print("token server fetch failed: \(error.localizedDescription)")
}
}
return self.joinChannel(channel, token: token, uid: DocsAppConfig.shared.uid, info: nil)
}
// Joins a channel, starting the connection to a session.
open func joinChannel(
_ channel: String, token: String? = nil, uid: UInt = 0, info: String? = nil
) -> Int32 {
self.agoraEngine.joinChannel(byToken: token, channelId: channel, info: info, uid: uid)
}
```
</PlatformWrapper>

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

``` swift
public override func setupEngine() -> AgoraRtcEngineKit {
let engine = super.setupEngine()

// Set Audio Scenario
engine.setAudioScenario(.gameStreaming)

// Enable dual stream mode
engine.setDualStreamMode(.enableSimulcastStream)
engine.setAudioProfile(.default)

// Set the video configuration
let videoConfig = AgoraVideoEncoderConfiguration(
size: CGSize(width: 640, height: 360),
frameRate: .fps10,
bitrate: AgoraVideoBitrateStandard,
orientationMode: .adaptative,
mirrorMode: .auto
)
engine.setVideoEncoderConfiguration(videoConfig)

return engine
}
```
17 changes: 17 additions & 0 deletions assets/code/video-sdk/get-started-sdk/swift/handle-events.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

``` swift
open func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinChannel channel: String, withUid uid: UInt, elapsed: Int) {
self.localUserId = uid
if self.role == .broadcaster {
self.allUsers.insert(uid)
}
}

open func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinedOfUid uid: UInt, elapsed: Int) {
self.allUsers.insert(uid)
}

open func rtcEngine(_ engine: AgoraRtcEngineKit, didOfflineOfUid uid: UInt, reason: AgoraUserOfflineReason) {
self.allUsers.remove(uid)
}
```
39 changes: 39 additions & 0 deletions assets/code/video-sdk/get-started-sdk/swift/join-channel.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

``` swift
open func joinChannel(
_ channel: String, token: String? = nil, uid: UInt = 0, info: String? = nil
) async -> Int32 {
if await !AgoraManager.checkForPermissions() {
DispatchQueue.main.async {
self.label = """
Camera and microphone permissions were not granted.
Check your security settings and try again.
"""
}
return -3
}

return self.agoraEngine.joinChannel(
byToken: token, channelId: channel,
info: info, uid: uid
)
}

// This method is specifically used by the sample app. If there is a tokenURL, it will attempt to retrieve a token from there.
internal func joinChannel(_ channel: String, uid: UInt? = nil) async -> Int32 {
let userId = uid ?? DocsAppConfig.shared.uid
var token = DocsAppConfig.shared.rtcToken
if !DocsAppConfig.shared.tokenUrl.isEmpty {
do {
token = try await self.fetchToken(
from: DocsAppConfig.shared.tokenUrl, channel: channel,
role: self.role, userId: userId
)
} catch {
print("token server fetch failed: \(error.localizedDescription)")
}
}
return await self.joinChannel(channel, token: token, uid: userId, info: nil)
}
```

13 changes: 13 additions & 0 deletions assets/code/video-sdk/get-started-sdk/swift/leave-channel.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

``` swift
open func leaveChannel(
leaveChannelBlock: ((AgoraChannelStats) -> Void)? = nil,
destroyInstance: Bool = true
) -> Int32 {
let leaveErr = self.agoraEngine.leaveChannel(leaveChannelBlock)
self.agoraEngine.stopPreview()
defer { if destroyInstance { AgoraRtcEngineKit.destroy() } }
self.allUsers.removeAll()
return leaveErr
}
```
11 changes: 1 addition & 10 deletions assets/images/signaling/get-started-workflow.puml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ end box
group Initialize
USR -> APP: Open app
APP -> APP: Create a signalingEngine instance
APP -> APP: Add event callbacks
APP -> APP: Add event listeners
APP -> APP: Set the authentication token
APP -> API: Log in to Signaling
end
Expand All @@ -29,15 +29,6 @@ API -> APP: message
APP -> USR: Receive message
end

group Presence

USR -> APP: Change status
APP -> APP: listen for user events
API -> APP: ConnectionStateChanged
APP -> USR: Inform users

end

group Close
USR -> APP: Log out
APP -> API: Log out of Signaling
Expand Down
Loading
Loading