File tree Expand file tree Collapse file tree 6 files changed +12
-11
lines changed Expand file tree Collapse file tree 6 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 15
15
venv /
16
16
.vscode /*
17
17
example.ipynb
18
+ example.py
Original file line number Diff line number Diff line change 4
4
import logging
5
5
6
6
from typing import Optional
7
- from videodb ._utils ._video import play_hls
7
+ from videodb ._utils ._video import play_stream
8
8
from videodb ._constants import VIDEO_DB_API
9
9
from videodb .client import Connection
10
10
from videodb .exceptions import (
24
24
"AuthenticationError" ,
25
25
"InvalidRequestError" ,
26
26
"SearchError" ,
27
- "play_hls " ,
27
+ "play_stream " ,
28
28
]
29
29
30
30
Original file line number Diff line number Diff line change 3
3
from videodb ._constants import PLAYER_URL
4
4
5
5
6
- def play_hls (url : str ):
7
- """Play a hls stream url in the browser/ notebook
6
+ def play_stream (url : str ):
7
+ """Play a stream url in the browser/ notebook
8
8
9
- :param str url: The url of the hls stream
9
+ :param str url: The url of the stream
10
10
:return: The player url if the stream is opened in the browser or the iframe if the stream is opened in the notebook
11
11
"""
12
12
player = f"{ PLAYER_URL } ?url={ url } "
Original file line number Diff line number Diff line change 1
1
from abc import ABC , abstractmethod
2
- from videodb ._utils ._video import play_hls
2
+ from videodb ._utils ._video import play_stream
3
3
from videodb ._constants import (
4
4
SearchType ,
5
5
ApiPath ,
@@ -86,7 +86,7 @@ def play(self) -> str:
86
86
:rtype: str
87
87
"""
88
88
self .compile ()
89
- return play_hls (self .stream_url )
89
+ return play_stream (self .stream_url )
90
90
91
91
92
92
class Search (ABC ):
Original file line number Diff line number Diff line change 2
2
3
3
4
4
from typing import Optional
5
- from videodb ._utils ._video import play_hls
5
+ from videodb ._utils ._video import play_stream
6
6
from videodb ._constants import (
7
7
ApiPath ,
8
8
)
@@ -78,4 +78,4 @@ def play(self) -> str:
78
78
:rtype: str
79
79
"""
80
80
self .generate_stream ()
81
- return play_hls (self .stream_url )
81
+ return play_stream (self .stream_url )
Original file line number Diff line number Diff line change 1
1
from typing import Optional
2
- from videodb ._utils ._video import play_hls
2
+ from videodb ._utils ._video import play_stream
3
3
from videodb ._constants import (
4
4
ApiPath ,
5
5
SearchType ,
@@ -182,4 +182,4 @@ def play(self) -> str:
182
182
:return: The stream url
183
183
:rtype: str
184
184
"""
185
- return play_hls (self .stream_url )
185
+ return play_stream (self .stream_url )
You can’t perform that action at this time.
0 commit comments