{"id":18465178,"url":"https://github.com/fishjam-dev/elixir_server_sdk","last_synced_at":"2025-12-12T00:22:06.300Z","repository":{"id":80622190,"uuid":"596986307","full_name":"fishjam-dev/elixir_server_sdk","owner":"fishjam-dev","description":"Elixir server SDK for Fishjam","archived":false,"fork":false,"pushed_at":"2024-06-13T11:27:52.000Z","size":6550,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T09:27:45.525Z","etag":null,"topics":["elixir","fishjam","membrane-control","video","webrtc"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fishjam-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-03T11:21:42.000Z","updated_at":"2025-01-21T02:50:20.000Z","dependencies_parsed_at":"2023-06-28T01:09:53.550Z","dependency_job_id":"83a12c9c-e732-4990-bb8c-54937e204b02","html_url":"https://github.com/fishjam-dev/elixir_server_sdk","commit_stats":null,"previous_names":["fishjam-dev/elixir_server_sdk"],"tags_count":5,"template":false,"template_full_name":"membraneframework/membrane_template_plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishjam-dev%2Felixir_server_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishjam-dev%2Felixir_server_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishjam-dev%2Felixir_server_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishjam-dev%2Felixir_server_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fishjam-dev","download_url":"https://codeload.github.com/fishjam-dev/elixir_server_sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247804534,"owners_count":20999007,"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":["elixir","fishjam","membrane-control","video","webrtc"],"created_at":"2024-11-06T09:12:15.047Z","updated_at":"2025-12-12T00:22:06.266Z","avatar_url":"https://github.com/fishjam-dev.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fishjam Elixir Server SDK\n\n[![Hex.pm](https://img.shields.io/hexpm/v/fishjam_server_sdk.svg)](https://hex.pm/packages/fishjam_server_sdk)\n[![API Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/fishjam_server_sdk/)\n[![codecov](https://codecov.io/gh/fishjam-dev/elixir_server_sdk/branch/master/graph/badge.svg?token=ByIko4o5U8)](https://codecov.io/gh/fishjam-dev/elixir_server_sdk)\n[![CircleCI](https://circleci.com/gh/fishjam-dev/elixir_server_sdk.svg?style=svg)](https://circleci.com/gh/fishjam-dev/elixir_server_sdk)\n\nElixir server SDK for [Fishjam](https://github.com/fishjam-dev/fishjam).\nCurrently it allows for:\n\n- making API calls to Fishjam server (QoL wrapper for HTTP requests)\n- listening to Fishjam server events via WebSocket\n\n## Installation\n\nThe package can be installed by adding `fishjam_server_sdk` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:fishjam_server_sdk, \"~\u003e 0.6.0\"}\n  ]\nend\n```\n\n## Fishjam connection configuration\n\nDefine the connection configuration in the mix config,\nspecifying server address and authentication token\n(for more information see [Fishjam docs](https://fishjam-dev.github.io/fishjam-docs/getting_started/authentication))\n``` config.exs\nconfig :fishjam_server_sdk,\n  server_address: \"localhost:5002\",\n  server_api_token: \"your-fishjam-token\",\n  secure?: true\n```\n\nAlternatively, the connection options can be provided when creating a `Fishjam.Client` or starting `Fishjam.WSNotifier`:\n\n```elixir\nclient =\n    Fishjam.Client.new(server_address: \"localhost:5002\", server_api_token: \"your-fishjam-token\")\n\n{:ok, notifier} =\n    Fishjam.WSNotifier.start(\n      server_address: \"localhost:5002\",\n      server_api_token: \"your-fishjam-token\"\n    )\n```\n\n## Usage\n\nMake API calls to Fishjam and receive server events:\n\n```elixir\n# start process responsible for receiving events\n{:ok, notifier} = Fishjam.WSNotifier.start()\n:ok = Fishjam.WSNotifier.subscribe_server_notifications(notifier)\n\n# create HTTP client instance\nclient = Fishjam.Client.new()\n\n# Create room\n{:ok, %Fishjam.Room{id: room_id}, fishjam_address} = Fishjam.Room.create(client, max_peers: 10)\n\nroom_id\n# =\u003e \"8878cd13-99a6-40d6-8d7e-8da23d803dab\"\n\n# Add peer\n{:ok, %Fishjam.Peer{id: peer_id}, peer_token} =\n    Fishjam.Room.add_peer(client, room_id, Fishjam.Peer.WebRTC)\n\nreceive do\n  {:fishjam, %Fishjam.Notification.PeerConnected{room_id: ^room_id, peer_id: ^peer_id}} -\u003e\n    # handle the notification\nend\n\n# Delete peer\n:ok = Fishjam.Room.delete_peer(client, room_id, peer_id)\n```\n\nList of structs representing events can be found in the [docs](https://hexdocs.pm/fishjam_server_sdk).\n\n## Testing\n\nWhen calling `mix test` it will automatically start the Fishjam container under the hood.\nTests on CI are run with the use of docker-compose, to run it locally in the same way as on CI run `mix integration_test`.\n\n## Copyright and License\n\nCopyright 2023, [Software Mansion](https://swmansion.com/?utm_source=git\u0026utm_medium=readme\u0026utm_campaign=fishjam)\n\n[![Software Mansion](https://logo.swmansion.com/logo?color=white\u0026variant=desktop\u0026width=200\u0026tag=membrane-github)](https://swmansion.com/?utm_source=git\u0026utm_medium=readme\u0026utm_campaign=fishjam)\n\nLicensed under the [Apache License, Version 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishjam-dev%2Felixir_server_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffishjam-dev%2Felixir_server_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishjam-dev%2Felixir_server_sdk/lists"}