Audio / Video Stream

The live audio/video stream is exposed through the AVReceiver class.

The AVReceiver class must be subclassed and have implementations for the AVReceiver.handle_video() and AVReceiver.handle_audio() methods. The audio and video frames that are passed to these methods are pyav frames.

A generic receiver is provided in this library with the QueueReceiver class.

Usage

To use a receiver, the receiver must be passed as a keyword argument to the RPDevice.create_session() method like in the example below.

from pyremoteplay import RPDevice
from pyremoteplay.receiver import QueueReceiver

ip_address = "192.168.86.2"
device = RPDevice(ip_address)
device.get_status()
user = device.get_users()[0]
receiver = QueueReceiver()
device.create_session(user, receiver=receiver)