Skip to content

Commit

Permalink
apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
regulad committed Sep 10, 2024
1 parent 6cf5614 commit c476a30
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pydroid_ipcam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ def audio_opus_url(self) -> str:
"""Return url that LibOPUS audio can be streamed from."""
return f"{self.base_url}/audio.opus"

def get_rtsp_url(self, video_codec: Literal["jpeg", "h264"] = "h264", audio_codec: Literal["ulaw", "alaw", "pcm", "opus", "aac"] = "opus") -> str:
def get_rtsp_url(
self,
video_codec: Literal["jpeg", "h264"] = "h264",
audio_codec: Literal["ulaw", "alaw", "pcm", "opus", "aac"] = "opus",
) -> str:
"""Return the RTSP URL for a given pair of video & audio codecs, using the developer-recommended h264 & opus if no arguments are supplied."""
rtsp_protocol = "rtsps" if self._ssl else "rtsp"
return f"{rtsp_protocol}://{self._host}:{self._port}/{video_codec}_{audio_codec}.sdp"
Expand Down

0 comments on commit c476a30

Please sign in to comment.