Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
c6a93ed
remove http API; add basic mautrix VoIP hooks
ara4n May 31, 2022
1795332
add sample config
ara4n May 31, 2022
5fe938d
rename sample config
ara4n May 31, 2022
a81ddea
.gitignore
ara4n May 31, 2022
1ac4be0
typo
ara4n May 31, 2022
1368d31
go fmt
ara4n May 31, 2022
8d8303d
merge main
ara4n May 31, 2022
e7c757a
Merge branch 'master' into matthew/matrix
ara4n Jun 2, 2022
0a0e308
theoretically hook up matrix to the focus (WIP)
ara4n Jun 3, 2022
36b5b09
we can infer device_id from /whoami
ara4n Jun 3, 2022
0586e38
pin to right go-mautrix
ara4n Jun 3, 2022
f604f23
fix build
ara4n Jun 3, 2022
5af7532
fix dep
ara4n Jun 3, 2022
782bcd2
hook up SDP-over-DC signalling again
ara4n Jun 3, 2022
e9844a4
hook up sfu->client ice candidates
ara4n Jun 3, 2022
9129b4e
hook up client->sfu candidates
ara4n Jun 3, 2022
79f887a
whack up the debug
ara4n Jun 5, 2022
5f1dc72
handle todevice msgs correctly
ara4n Jun 5, 2022
6e1eb29
fix stupid map lifecycle bugs
ara4n Jun 5, 2022
6599350
fix up sessions
ara4n Jun 5, 2022
6cb5842
unmarshal DC correctly
ara4n Jun 5, 2022
e2e8a82
debugging
ara4n Jun 5, 2022
ba82de8
experiment: stop namespacing on streamIDs
ara4n Jun 5, 2022
1dd777b
moar logging
ara4n Jun 5, 2022
fba15af
don't barf on candidate completion
ara4n Jun 5, 2022
95cffd1
more debugging; handle stream lookup failure correctly
ara4n Jun 5, 2022
8bd0d04
reenable ICE
ara4n Jun 5, 2022
0053c43
only send ICE candidates after we've calculated an answer
ara4n Jun 5, 2022
fb61684
remove debugging
ara4n Jun 6, 2022
f3d9cdb
Delint
SimonBrandner Jul 30, 2022
46c7e3a
Add more logging for DC
SimonBrandner Jul 30, 2022
b7add84
Add useful logging
SimonBrandner Jul 30, 2022
0305ee0
Update `.mod` files
SimonBrandner Jul 30, 2022
2b4bafb
Fix types
SimonBrandner Jul 31, 2022
831d7b0
Be more precise about `m.call.negotaite`
SimonBrandner Jul 31, 2022
a3ec7d8
Delint
SimonBrandner Jul 31, 2022
ca48340
Delint
SimonBrandner Jul 31, 2022
5291787
Make basic group calling work
SimonBrandner Jul 31, 2022
d0cb49b
Handle events we don't care about nicer
SimonBrandner Aug 1, 2022
8393552
Handle `m.call.hangup` and `m.call.select_answer`
SimonBrandner Aug 1, 2022
699e362
Allow lookup of tracks by info about them
SimonBrandner Aug 1, 2022
d592bf3
Make leaving confs work
SimonBrandner Aug 2, 2022
0caefb1
Move golang files into `src`
SimonBrandner Aug 2, 2022
209be90
Reogranize source code
SimonBrandner Aug 2, 2022
7d57680
Add newline
SimonBrandner Aug 2, 2022
ab61cda
Remove `static` dir
SimonBrandner Aug 2, 2022
8eff32f
Delint `README.md`
SimonBrandner Aug 2, 2022
484aed8
Add copyrights
SimonBrandner Aug 2, 2022
3659366
Extract `onTrack`
SimonBrandner Aug 2, 2022
c690431
Extract `sendDataChannelMessage()`
SimonBrandner Aug 2, 2022
2d8cf74
Add support for `publish`
SimonBrandner Aug 2, 2022
5b62e45
Extract `sendDataChannelError()`
SimonBrandner Aug 2, 2022
a78c8ec
Correctly remove tracks when a person leaves a call
SimonBrandner Aug 3, 2022
37b1c35
Update scripts
SimonBrandner Aug 3, 2022
6d91759
Move scripts into a separete dir
SimonBrandner Aug 3, 2022
1ad36e9
Update README
SimonBrandner Aug 3, 2022
ee5a4c3
Select by both `streamId` and `trackId`
SimonBrandner Aug 3, 2022
805244e
Improve logging
SimonBrandner Aug 3, 2022
cb7c76f
Correctly log `select`
SimonBrandner Aug 3, 2022
8398119
Log `userID`s instead of `callID`s
SimonBrandner Aug 3, 2022
cd3076b
Fix terminate call log
SimonBrandner Aug 3, 2022
b999bda
Fix more logs
SimonBrandner Aug 3, 2022
0d373b0
Don't error if we found no tracks
SimonBrandner Aug 3, 2022
5657c6d
Try to fix race condition where track is later than state event
SimonBrandner Aug 3, 2022
060a528
Fix `tracks` mutex
SimonBrandner Aug 3, 2022
c591a4a
Handle no tracks to remove better
SimonBrandner Aug 4, 2022
6063f2c
Better logging
SimonBrandner Aug 4, 2022
646efa7
Add `unpublish`
SimonBrandner Aug 4, 2022
ca546c6
Remove old call with device id when we get a new one
SimonBrandner Aug 6, 2022
4778573
Fix `addSubscribedTracksToPeerConnection()` being called for incorrec…
SimonBrandner Aug 6, 2022
928604e
Add comment
SimonBrandner Aug 7, 2022
b8479f0
Remove empty line
SimonBrandner Aug 7, 2022
24a3e0b
Support profiling
SimonBrandner Aug 7, 2022
e5bec68
Better cpu and memory profiling
SimonBrandner Aug 8, 2022
d80dada
Implement sessions ids
SimonBrandner Aug 8, 2022
f0282d8
Theoretical perf improvement
SimonBrandner Aug 9, 2022
ebf4e10
Use gorutines
SimonBrandner Aug 9, 2022
becdee7
Lock later
SimonBrandner Aug 9, 2022
7eb8480
Move `getConf()` to the correct place
SimonBrandner Aug 11, 2022
c7cda4d
Implement timeouts
SimonBrandner Aug 11, 2022
6149d7f
Remove some debug logs
SimonBrandner Aug 11, 2022
d3b4ba3
Add vscode to gitignore
SimonBrandner Aug 11, 2022
80e9192
Fix timeouts
SimonBrandner Aug 11, 2022
3f56374
Make logging time optional
SimonBrandner Aug 11, 2022
4845a7e
Fix warning
SimonBrandner Aug 11, 2022
bdd0bbe
Remove unused packages
SimonBrandner Aug 11, 2022
9c1e479
Fix disabling loggin
SimonBrandner Aug 11, 2022
4dfd79e
Don't log some events
SimonBrandner Aug 12, 2022
b80edd6
Improve logging
SimonBrandner Aug 12, 2022
02e553c
Switch to data-channel for sending metadata
SimonBrandner Aug 13, 2022
02825ea
Update README
SimonBrandner Aug 13, 2022
e513dd1
Add new lines
SimonBrandner Aug 13, 2022
e473cd9
Remove cascade - will be readded later
SimonBrandner Aug 13, 2022
7dbe06b
Follow naming conventions
SimonBrandner Aug 13, 2022
052aacc
Add `WriteRTCP()`
SimonBrandner Aug 13, 2022
8d730e0
Rename `config` to `Config`
SimonBrandner Aug 13, 2022
cc822e2
Remove unused field
SimonBrandner Aug 13, 2022
8e1c608
Improve typing
SimonBrandner Aug 13, 2022
59907f5
Rename type
SimonBrandner Aug 13, 2022
22b3d81
Move types into mautrix-go
SimonBrandner Aug 13, 2022
ccf28d5
Use `ToDevice` prefix
SimonBrandner Aug 13, 2022
b528c03
Move types to mautrix-go
SimonBrandner Aug 13, 2022
250e2c9
Remove comment
SimonBrandner Aug 13, 2022
839ae57
Remove type
SimonBrandner Aug 13, 2022
e82cc39
Improve logging in utils
SimonBrandner Aug 14, 2022
71c2a0f
Don't timeout already ended calls
SimonBrandner Aug 14, 2022
9abb6d9
Break out of `WriteRTCP` loop on error
SimonBrandner Aug 14, 2022
0bb1871
Add somu mutex locks and unlocks
SimonBrandner Aug 14, 2022
5c45ebf
Fix incorrect mutex usege
SimonBrandner Aug 14, 2022
8d45581
Fixup same small issues
SimonBrandner Aug 14, 2022
f528225
Don't assume everyone is Šimon
SimonBrandner Aug 15, 2022
4bf1c55
Don't kill the SFU when receiving invalid messages
SimonBrandner Aug 15, 2022
f0cfb9e
Improve log
SimonBrandner Aug 15, 2022
1e127f0
Separate `DataChannelHandler()`
SimonBrandner Aug 15, 2022
80be219
Don't panic where we don't need to
SimonBrandner Aug 15, 2022
6a2bf28
Comment `GetRemoteMetadataForDevice()`
SimonBrandner Aug 15, 2022
a0504d0
Rename function
SimonBrandner Aug 15, 2022
02bcae8
Add `NewFocus`
SimonBrandner Aug 15, 2022
42ebd11
Fix public/private
SimonBrandner Aug 15, 2022
8698c08
Rename var
SimonBrandner Aug 15, 2022
7a47a55
Send `UsernameFragment`
SimonBrandner Aug 15, 2022
223fbd7
Update
SimonBrandner Aug 15, 2022
e0255e4
Restructure to use `OnEvent`
SimonBrandner Aug 15, 2022
b7e8cbc
Update `go.mod`
SimonBrandner Aug 15, 2022
cc0c2e5
Send end of ICE
SimonBrandner Aug 17, 2022
0f40571
Remove UsernameFragment
SimonBrandner Aug 17, 2022
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
18 changes: 10 additions & 8 deletions src/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ func (c *Call) iceCandidateHandler(candidate *webrtc.ICECandidate) {

jsonCandidate := candidate.ToJSON()

callCandidate := event.CallCandidate{
Candidate: jsonCandidate.Candidate,
SDPMLineIndex: int(*jsonCandidate.SDPMLineIndex),
SDPMID: *jsonCandidate.SDPMid,
}
if jsonCandidate.UsernameFragment != nil {
callCandidate.UsernameFragment = *jsonCandidate.UsernameFragment
}

candidateEvtContent := &event.Content{
Parsed: event.CallCandidatesEventContent{
BaseCallEventContent: event.BaseCallEventContent{
Expand All @@ -246,14 +255,7 @@ func (c *Call) iceCandidateHandler(candidate *webrtc.ICECandidate) {
PartyID: string(c.Client.DeviceID),
Version: event.CallVersion("1"),
},
Candidates: []event.CallCandidate{
{
Candidate: jsonCandidate.Candidate,
SDPMLineIndex: int(*jsonCandidate.SDPMLineIndex),
SDPMID: *jsonCandidate.SDPMid,
// XXX: what about ice.UsernameFragment?
},
},
Candidates: []event.CallCandidate{callCandidate},
},
}
c.sendToDevice(event.CallCandidates, candidateEvtContent)
Expand Down