pglet / pglet-python

Python client for Pglet - build real-time interactive web apps in Python
MIT License
18 stars 7 forks source link

Embedding a video with HTML - example #24

Closed R-fred closed 3 years ago

R-fred commented 3 years ago
import pglet
from pglet import Text, Html
import pglet.toolbar as pgltb

def main(page):
    page.add(Html(value="<b>This is an html text, embedded as Html()</b>", visible=True))
    page.add(Text("This is an embedded video."))
    page.add(Html('<iframe width="560" height="315" src="https://www.youtube.com/embed/TbB2ENgAHAQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>', visible=True))

pglet.app(name="myapp", target=main, local=True)
Screenshot 2021-05-23 at 16 58 44
FeodorFitsner commented 3 years ago

Nice! Dark theme is the default now. 🕶️