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 1515venv /
1616.vscode /*
1717example.ipynb
18+ example.py
Original file line number Diff line number Diff line change 44import logging
55
66from typing import Optional
7- from videodb ._utils ._video import play_hls
7+ from videodb ._utils ._video import play_stream
88from videodb ._constants import VIDEO_DB_API
99from videodb .client import Connection
1010from videodb .exceptions import (
2424 "AuthenticationError" ,
2525 "InvalidRequestError" ,
2626 "SearchError" ,
27- "play_hls " ,
27+ "play_stream " ,
2828]
2929
3030
Original file line number Diff line number Diff line change 33from videodb ._constants import PLAYER_URL
44
55
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
88
9- :param str url: The url of the hls stream
9+ :param str url: The url of the stream
1010 :return: The player url if the stream is opened in the browser or the iframe if the stream is opened in the notebook
1111 """
1212 player = f"{ PLAYER_URL } ?url={ url } "
Original file line number Diff line number Diff line change 11from abc import ABC , abstractmethod
2- from videodb ._utils ._video import play_hls
2+ from videodb ._utils ._video import play_stream
33from videodb ._constants import (
44 SearchType ,
55 ApiPath ,
@@ -86,7 +86,7 @@ def play(self) -> str:
8686 :rtype: str
8787 """
8888 self .compile ()
89- return play_hls (self .stream_url )
89+ return play_stream (self .stream_url )
9090
9191
9292class Search (ABC ):
Original file line number Diff line number Diff line change 22
33
44from typing import Optional
5- from videodb ._utils ._video import play_hls
5+ from videodb ._utils ._video import play_stream
66from videodb ._constants import (
77 ApiPath ,
88)
@@ -78,4 +78,4 @@ def play(self) -> str:
7878 :rtype: str
7979 """
8080 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 11from typing import Optional
2- from videodb ._utils ._video import play_hls
2+ from videodb ._utils ._video import play_stream
33from videodb ._constants import (
44 ApiPath ,
55 SearchType ,
@@ -182,4 +182,4 @@ def play(self) -> str:
182182 :return: The stream url
183183 :rtype: str
184184 """
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