Skip to content

Commit 394f753

Browse files
committed
sync xtend
1 parent 72a5a22 commit 394f753

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

fasthtml/xtend.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,21 @@ def YouTubeEmbed(video_id:str, *, width:int=560, height:int=315, start_time:int=
216216
if start_time>0: params.append(f"start={start_time}")
217217
if no_controls: params.append("controls=0")
218218
query_string = "?" + "&".join(params) if params else ""
219+
print(f"https://www.youtube.com/embed/{video_id}{query_string}")
219220
return Div(
220-
Iframe(width=width, height=height, src=f"https://www.youtube.com/embed/{video_id}{query_string}", title=title, frameborder="0",
221+
Iframe(
222+
width=width,
223+
height=height,
224+
src=f"https://www.youtube.com/embed/{video_id}{query_string}",
225+
title=title,
226+
frameborder="0",
221227
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
222-
referrerpolicy="strict-origin-when-cross-origin", allowfullscreen='', **kwargs
228+
referrerpolicy="strict-origin-when-cross-origin",
229+
allowfullscreen='',
230+
**kwargs
223231
),
224-
cls=cls)
232+
cls=cls
233+
)
225234

226235
# %% ../nbs/api/02_xtend.ipynb
227236
def Favicon(light_icon, dark_icon):

0 commit comments

Comments
 (0)