Developer Referencertc
AudioMedia
Audio track that serves pre-encoded packets from a PipelineBridge.
Attributes
attributedata_pipeline= data_pipelineFunctions
func__init__(self, data_pipeline) -> NoneSource Code
def __init__(self, data_pipeline: PipelineBridge) -> None:
super().__init__()
self.data_pipeline = data_pipelineparamselfparamdata_pipelinePipelineBridgeReturns
Nonefuncrecv(self) -> EncodedPacketReturn the next encoded audio packet from the bridge.
Source Code
async def recv(self) -> EncodedPacket:
"""Return the next encoded audio packet from the bridge."""
packet = await self.data_pipeline.get_data()
return packetparamselfReturns
selkies.webrtc.codecs.base.EncodedPacket