@@ -66,14 +66,21 @@ def __new__(
6666 CSI Camera Parameters:
6767 device (int | str): CSI device. Default: 0.
6868 IP Camera Parameters:
69- url (str): Camera stream URL
69+ url (str): Camera stream URL.
7070 username (str, optional): Authentication username.
7171 password (str, optional): Authentication password.
7272 timeout (float): Connection timeout in seconds. Default: 10.0.
7373 WebSocket Camera Parameters:
74- host (str): WebSocket server host. Default: "0.0.0.0".
75- port (int): WebSocket server port. Default: 8080.
76- timeout (float): Connection timeout in seconds. Default: 10.0.
74+ port (int): Port to bind the server to. Default: 8080.
75+ timeout (int): Connection timeout in seconds. Default: 3.
76+ certs_dir_path (str): Path to directory containing TLS certificates.
77+ Default: "/app/certs".
78+ use_tls (bool): Enable TLS for secure connections. If True, 'encrypt'
79+ will be ignored. Default: False.
80+ secret (str): Secret key for authentication/encryption. Empty string
81+ disables security. Default: "".
82+ encrypt (bool): Enable encryption (only effective if secret is provided).
83+ Default: False.
7784
7885 Returns:
7986 BaseCamera: Appropriate camera implementation instance
@@ -108,7 +115,8 @@ def __new__(
108115
109116 ```python
110117 camera = Camera("ws://0.0.0.0:8080")
111- camera = Camera("ws://192.168.1.100:8080", timeout=5)
118+ camera = Camera("ws://0.0.0.0:8080", secret="my_secret", encrypt=True)
119+ camera = Camera("ws://0.0.0.0:8080", use_tls=True, certs_dir_path="/path/to/certs")
112120 ```
113121 """
114122 if not isinstance (source , (str , int )):
0 commit comments