Packages

WebSocket client for Janus WebRTC Gateway

Current section

3 Versions

Jump to

Compare versions

4 files changed
+7 additions
-5 deletions
  @@ -1 +1,3 @@
1 - for interacting with janus gateway via websockets
1 + [![Hex pm](http://img.shields.io/hexpm/v/janus_ws.svg?style=flat)](https://hex.pm/packages/janus_ws)
2 +
3 + For interacting with [Janus WebRTC Gateway](https://github.com/meetecho/janus-gateway) via WebSockets.
  @@ -19,4 +19,4 @@
19 19 {<<"optional">>,false},
20 20 {<<"repository">>,<<"hexpm">>},
21 21 {<<"requirement">>,<<"~> 0.4.2">>}]]}.
22 - {<<"version">>,<<"0.1.0">>}.
22 + {<<"version">>,<<"0.1.1">>}.
  @@ -51,7 +51,7 @@ defmodule Janus.WS do
51 51
52 52 %{"transaction" => transaction} = msg ->
53 53 {maybe_from, pending_txs} = Map.pop(pending_txs, transaction)
54 - if maybe_from, do: send(maybe_from, msg)
54 + if maybe_from, do: send(maybe_from, {:janus_ws, msg})
55 55 {:ok, %{state | pending_txs: pending_txs}}
56 56 end
57 57 end
  @@ -166,7 +166,7 @@ defmodule Janus.WS do
166 166 defp _broadcast(registry, session_id, message) when not is_nil(registry) do
167 167 Registry.dispatch(registry, session_id, fn entries ->
168 168 Enum.each(entries, fn {pid, _} ->
169 - send(pid, message)
169 + send(pid, {:janus_ws, message})
170 170 end)
171 171 end)
172 172 end
  @@ -1,7 +1,7 @@
1 1 defmodule Janus.WS.MixProject do
2 2 use Mix.Project
3 3
4 - @version "0.1.0"
4 + @version "0.1.1"
5 5
6 6 def project do
7 7 [