Rtmp

class Rtmp(enableWrite: Boolean = true) : Closeable

A RTMP connection.

Parameters

enableWrite

if you are broadcasting live stream, set to Boolean.true. Otherwise Boolean.false.

Constructors

Link copied to clipboard
constructor(enableWrite: Boolean = true)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Check if device it still connected with the remote RTMP server

Link copied to clipboard

Set/get supported video codecs. It is a list of video mime types.

Link copied to clipboard

Set/get connection timeout in ms

Functions

Link copied to clipboard
open override fun close()

Closes the RTMP connection.

Link copied to clipboard
fun connect(url: String)

Connects to a remote RTMP server.

Link copied to clipboard

Creates a new stream.

Link copied to clipboard

Deletes a running stream.

Link copied to clipboard
fun pause()

Pauses a stream

Link copied to clipboard
fun read(array: ByteArray, offset: Int = 0, size: Int = array.size): Int

Reads FLV packets.

Link copied to clipboard

Read a RTMP packet

Link copied to clipboard
fun resume()

Resumes a stream after a pause.

Link copied to clipboard
fun serve(fd: Int)

Handshakes incoming client.

Link copied to clipboard
fun write(buffer: ByteBuffer): Int

Sends a FLV packet inside a ByteBuffer.

fun write(array: ByteArray, offset: Int = 0, size: Int = array.size): Int

Sends a FLV packet inside a ByteArray.

Link copied to clipboard
fun writePacket(packet: RtmpPacket)

Write a RTMP packet