Debian Codegraph @

rtsp_to_webrtc/interface.py

raw symbols SCIP
1 """Interface for client library for RTSPtoWeb / RTSPtoWebRTC server."""
2
3 from __future__ import annotations
4
5 from abc import ABC, abstractmethod
6 from typing import Any
7
8
9 class WebRTCClientInterface(ABC):
10 """Client for RTSPtoWeb / RTSPtoWebRTC server."""
11
12 @abstractmethod
13 async def offer(self, offer_sdp: str, rtsp_url: str) -> str:
14 """Send the WebRTC offer to the server."""
15
16 @abstractmethod
17 async def offer_stream_id(
18 self,
19 stream_id: str,
20 offer_sdp: str,
21 rtsp_url: str,
22 channel_data: dict[str, Any] | None = None,
23 ) -> str:
24 """Send the WebRTC offer to the server."""
25
26 @abstractmethod
27 async def heartbeat(self) -> None:
28 """Send a request to the server to determine if it is alive."""