{"id":16606688,"url":"https://github.com/abdularis/janus-client-go","last_synced_at":"2025-07-05T03:35:34.203Z","repository":{"id":57661859,"uuid":"477281115","full_name":"abdularis/janus-client-go","owner":"abdularis","description":"Janus WebRTC API client for Golang (WIP)","archived":false,"fork":false,"pushed_at":"2022-04-17T12:34:03.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T22:08:40.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abdularis.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-03T08:29:50.000Z","updated_at":"2022-04-04T14:44:13.000Z","dependencies_parsed_at":"2022-09-13T00:32:16.545Z","dependency_job_id":null,"html_url":"https://github.com/abdularis/janus-client-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abdularis/janus-client-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdularis%2Fjanus-client-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdularis%2Fjanus-client-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdularis%2Fjanus-client-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdularis%2Fjanus-client-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdularis","download_url":"https://codeload.github.com/abdularis/janus-client-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdularis%2Fjanus-client-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263677006,"owners_count":23494615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T01:09:39.168Z","updated_at":"2025-07-05T03:35:34.184Z","avatar_url":"https://github.com/abdularis.png","language":"Go","readme":"# Janus WebRTC Gateway API Client for Golang\n\n\u003e support only for janus multistream (latest)\n\nJanus WebRTC server client write in Go language. implemented using Websocket transport protocol to communicate with Janus API.\n\n\n## Usage\n\n**Install**\n```shell\ngo get github.com/abdularis/janus-client-go\n```\n\nnote that if WebSocket connection to Janus server terminated all resources in janus such as \nsessions/handles will also be cleared.\nUnless you set non-zero value to `reclaim_session_timeout` in `janus.jcfg` to give chance for session to be reclaimed.\nthis library will try to reclaim session if connection terminated abnormally.\n\n**Connect to Janus Gateway**\n```go\n// connect to janus using ws transport\ngateway, err := janus.Connect(\"ws://localhost:8188\")\nif err != nil {\n    log.Fatal(err)\n}\n\n// get janus server info and print them\ninfo, err := gateway.Info()\nif err != nil {\n    log.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", info)\n```\n\n**Create Janus Session \u0026 Handle**\n```go\n...\n\nsession, err := gateway.Create()\nif err != nil {\n    log.Fatal(err)\n}\n\n// create new plugin handle and attach it to video room plugin\nhandle, err := session.Attach(videoroom.PackageName)\nif err != nil {\n    log.Fatal(err)\n}\n```\n\n**Keep Janus Session Alive**\n\nJanus session will timeout after a while as configured, send keep alive message\nto keep it stay\n```go\n...\n\ngo func() {\n    t := time.NewTicker(time.Second * 50)\n    for ; ; \u003c-t.C {\n        _ = session.KeepAlive()\n    }\n}()\n```\n\n## Janus Plugin\n\nJanus plugin could process request synchronously or asynchronously, read the docs for each plugin to know more.\nTherefore, use `handle.Request()` for synchronous operation and `handle.Message()` for asynchronous operation.\n\nImplemented wrappers:\n- VideoRoom (WIP)\n- AudioBridge (WIP)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdularis%2Fjanus-client-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdularis%2Fjanus-client-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdularis%2Fjanus-client-go/lists"}