feat: link convert support preview
This commit is contained in:
parent
c12faa9d56
commit
2088729410
@ -10,3 +10,13 @@ def loop():
|
||||
if button_clicked and input_link != "":
|
||||
res = api.convert_tg_link_to_proxy_link(input_link)
|
||||
st.text_area("Convert res text area", value=res, label_visibility="hidden")
|
||||
# preview convert link
|
||||
@st.experimental_fragment
|
||||
def _inner():
|
||||
container = st.container()
|
||||
if container.button("Preview", key=f"convertLinkPreviewBtn", use_container_width=True):
|
||||
p_url = res if res else "./static/404.webm"
|
||||
mime_type = "video/mp4" if res else "video/webm"
|
||||
container.video(p_url, autoplay=False, format=mime_type)
|
||||
|
||||
_inner()
|
||||
|
Loading…
x
Reference in New Issue
Block a user