File tree Expand file tree Collapse file tree 5 files changed +22
-6
lines changed
Expand file tree Collapse file tree 5 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ The package can be installed by adding `membrane_rtmp_plugin` to your list of de
1414``` elixir
1515def deps do
1616 [
17- {:membrane_rtmp_plugin , " ~> 0.27.3 " }
17+ {:membrane_rtmp_plugin , " ~> 0.28.0 " }
1818 ]
1919end
2020```
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ defmodule Membrane.RTMP.Source do
3636 An URL on which the client is expected to connect, for example:
3737 rtmp://127.0.0.1:1935/app/stream_key
3838 """
39+ ] ,
40+ client_timeout: [
41+ default: Membrane.Time . seconds ( 5 ) ,
42+ spec: Membrane.Time . t ( ) ,
43+ description: """
44+ Time after which an unused client connection is automatically closed, expressed in `Membrane.Time.t()` units. Defaults to 5 seconds.
45+ """
3946 ]
4047
4148 defguardp is_builtin_server ( opts )
@@ -54,7 +61,8 @@ defmodule Membrane.RTMP.Source do
5461 url: opts . url ,
5562 mode: :builtin_server ,
5663 client_ref: nil ,
57- use_ssl?: nil
64+ use_ssl?: nil ,
65+ client_timeout: opts . client_timeout
5866 }
5967
6068 { [ ] , state }
@@ -94,7 +102,7 @@ defmodule Membrane.RTMP.Source do
94102 port: port ,
95103 use_ssl?: use_ssl? ,
96104 handle_new_client: handle_new_client ,
97- client_timeout: Membrane.Time . milliseconds ( 100 )
105+ client_timeout: state . client_timeout
98106 )
99107
100108 state = % { state | app: app , stream_key: stream_key , server: server_pid }
Original file line number Diff line number Diff line change @@ -39,14 +39,22 @@ defmodule Membrane.RTMP.SourceBin do
3939 An URL on which the client is expected to connect, for example:
4040 rtmp://127.0.0.1:1935/app/stream_key
4141 """
42+ ] ,
43+ client_timeout: [
44+ default: Membrane.Time . seconds ( 5 ) ,
45+ spec: Membrane.Time . t ( ) ,
46+ description: """
47+ Time after which an unused client connection is automatically closed, expressed in `Membrane.Time.t()` units. Defaults to 5 seconds.
48+ """
4249 ]
4350
4451 @ impl true
4552 def handle_init ( _ctx , % __MODULE__ { } = opts ) do
4653 spec =
4754 child ( :src , % RTMP.Source {
4855 client_ref: opts . client_ref ,
49- url: opts . url
56+ url: opts . url ,
57+ client_timeout: opts . client_timeout
5058 } )
5159 |> child ( :demuxer , Membrane.FLV.Demuxer )
5260
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ defmodule Membrane.RTMPServer do
1111 which defines how the client should behave.
1212 - port: Port on which RTMP server will listen. Defaults to 1935.
1313 - use_ssl?: If true, SSL socket (for RTMPS) will be used. Othwerwise, TCP socket (for RTMP) will be used. Defaults to false.
14- - client_timeout: Time after which an unused client connection is automatically closed. Defaults to 5 seconds.
14+ - client_timeout: Time after which an unused client connection is automatically closed, expressed in `Membrane.Time.t()` units . Defaults to 5 seconds.
1515 - name: If not nil, value of this field will be used as a name under which the server's process will be registered. Defaults to nil.
1616 """
1717 use GenServer
Original file line number Diff line number Diff line change 11defmodule Membrane.RTMP.Mixfile do
22 use Mix.Project
33
4- @ version "0.27.3 "
4+ @ version "0.28.0 "
55 @ github_url "https://github.com/membraneframework/membrane_rtmp_plugin"
66
77 def project do
You can’t perform that action at this time.
0 commit comments