rtmp v0.2.0 Rtmp.ClientSession.Handler
This module controls the process that processes the busines logic of a client in an RTMP connection.
When RTMP messages come in from the server, it either responds with response messages or raises events to be handled by the event receiver process. This allows for consumers to be flexible in how they utilize the RTMP client.
Summary
Functions
Passes an incoming RTMP message to the session handler
Notifies the session handler of new input or output byte totals
Sends audio or video data to the server over the specified stream key. This is ignored if we are not in an active publishing session for that stream key
Sends new metadata to the server over the specified stream key. This is ignored if we are not in an active publishing session on that stream key
Executes a request to send an RTMP connection request for the specified application name. The
response will come as a Rtmp.ClientSession.Events.ConnectionResponseReceived
event
Sends a request to play from the specified stream key. The response will come back as
a Rtmp.ClientSession.Events.PlayResponseReceived
event
Sends a request to the server that the client wishes to publish data on the specified stream key.
The response will come as a Rtmp.ClientSession.Events.PublishResponseReceived
response being raised
Specifies the process id and function to use to raise event notifications
Specifies the process id and function to send outbound RTMP messages
Starts a new client session handler process
Attempts to stop playback for the specified stream key. Does nothing if we do not have an active playback session on the specified stream key
Attempts to stop publishing on the specified stream key. This is ignored if we are not actively publishing on that stream key
Types
Functions
handle_rtmp_input(session_handler_process, Rtmp.Protocol.DetailedMessage.t) :: :ok
Passes an incoming RTMP message to the session handler
notify_byte_count(Rtmp.Behaviours.SessionHandler.session_handler_pid, Rtmp.Behaviours.SessionHandler.io_count_direction, non_neg_integer) :: :ok
Notifies the session handler of new input or output byte totals
publish_av_data(session_handler_process, Rtmp.stream_key, av_type, Rtmp.timestamp, binary) :: :ok
Sends audio or video data to the server over the specified stream key. This is ignored if we are not in an active publishing session for that stream key.
publish_metadata(session_handler_process, Rtmp.stream_key, Rtmp.StreamMetadata.t) :: :ok
Sends new metadata to the server over the specified stream key. This is ignored if we are not in an active publishing session on that stream key
Executes a request to send an RTMP connection request for the specified application name. The
response will come as a Rtmp.ClientSession.Events.ConnectionResponseReceived
event.
Sends a request to play from the specified stream key. The response will come back as
a Rtmp.ClientSession.Events.PlayResponseReceived
event.
request_publish(session_handler_process, Rtmp.stream_key, publish_type) :: :ok
Sends a request to the server that the client wishes to publish data on the specified stream key.
The response will come as a Rtmp.ClientSession.Events.PublishResponseReceived
response being raised
set_event_handler(session_handler_process, event_receiver_process, event_receiver_module) :: :ok | :handler_already_set
Specifies the process id and function to use to raise event notifications.
It is expected that the module passed in implements the Rtmp.Behaviours.EventReceiver
behaviour.
set_protocol_handler(session_handler_process, protocol_handler_process, protocol_handler_module) :: :ok | :handler_already_set
Specifies the process id and function to send outbound RTMP messages
It is expected that the module passed in implements the Rtmp.Behaviours.ProtocolHandler
behaviour.
start_link(Rtmp.connection_id, Rtmp.ClientSession.Configuration.t) :: {:ok, session_handler_process}
Starts a new client session handler process
Attempts to stop playback for the specified stream key. Does nothing if we do not have an active playback session on the specified stream key
Attempts to stop publishing on the specified stream key. This is ignored if we are not actively publishing on that stream key.