Developer Referencewebrtc_engine
AudioMedia
Audio track that serves pre-encoded packets from a PipelineBridge.
Attributes
attributedata_pipeline= data_pipelineFunctions
constructor__init__(data_pipeline) -> NoneSource Code
def __init__(self, data_pipeline: PipelineBridge) -> None:
super().__init__()
self.data_pipeline = data_pipelineparamdata_pipelinePipelineBridgeReturns
Nonefuncrecv() -> 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 packetReturns
selkies.webrtc.codecs.base.EncodedPacket