Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hakobera/go-ayame
go-ayame is go client library for WebRTC Signaling Server Ayame
https://github.com/hakobera/go-ayame
datachannel go p2p webrtc websocket
Last synced: about 1 month ago
JSON representation
go-ayame is go client library for WebRTC Signaling Server Ayame
- Host: GitHub
- URL: https://github.com/hakobera/go-ayame
- Owner: hakobera
- License: apache-2.0
- Created: 2020-02-02T11:36:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-17T01:51:31.000Z (about 1 year ago)
- Last Synced: 2024-11-07T13:38:04.355Z (about 2 months ago)
- Topics: datachannel, go, p2p, webrtc, websocket
- Language: Go
- Size: 176 KB
- Stars: 28
- Watchers: 2
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pion - hakobera/go-ayame - Client library for WebRTC Signaling Server with Ayame (Media API)
README
# go-ayame
go-ayame は [WebRTC Signaling Server Ayame](https://github.com/OpenAyame/ayame) の Go 言語用のクライアントライブラリです。
## 前提事項
go-ayame を利用するには go 1.14 以上が必要です。
## 使い方
```go
import "github.com/hakobera/go-ayame/ayame"signalingURL := "wss://ayame-labo.shiguredo.jp/signaling"
roomID := "your_room_id"// ayame.Connect の作成
opts := ayame.DefaultOptions()
con := ayame.NewConnection(signalingURL, roomID, opts, false, false)// PeerConnecition 接続時の処理
con.OnConnect(func() {
fmt.Println("Connected")
})// 動画、音声パケットデータ受信時の処理
con.OnTrackPacket(func(track *webrtc.Track, packet *rtp.Packet) {
switch track.Kind() {
case webrtc.RTPCodecTypeAudio:
// Audio データを使って何かをする
case webrtc.RTPCodecTypeVideo:
// Video データを使って何かをする
}
})// Ayame サーバーへ接続
err := con.Connect()
if err != nil {
log.Fatal("failed to connect Ayame", err)
}
```## License
```
Copyright 2020 Kazuyuki Honda (hakobera)Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```