Embed youtube video in markmin (à la web2py book)

18 views
Skip to first unread message

Jon Subscripted

unread,
Mar 31, 2020, 12:01:03 PM3/31/20
to web...@googlegroups.com
Hi everyone,
I have a part of my website shaped as web2py book. In order to handle long texts in different languages.

As you might know content is in *.markmin files that are reprocessed into HTML to be served by a generic controller.

I'm trying to embed a youtube video in the *.markmin file. I tried the following approaches, but none of them worked:

1) Enter HTML directly:
<iframe width="560" height="315" src="https://www.youtube.com/embed/pbIm1R_FBps" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

 2) Use the IFRAME helper:
{{=IFRAME(_src="https://www.youtube.com/embed/pbIm1R_FBps")}}

 3) Use the link  wrapped in HTML5 tags directly:
<video>https://www.youtube.com/embed/pbIm1R_FBps</video>

 4) Use the format from ( http://fpl.cs.depaul.edu/jriely/360/extras/ractive-web2py/web2py/gluon/contrib/markmin/markmin.html ):
[[message https://www.youtube.com/embed/pbIm1R_FBps video]]

Option 4, does show a video frame, but then the video does not play o_O

How should I include the link inside the markmin files to make it work?

I know I do not fully understand the mechanics, so most probably there's some conceptual error in my implementation.
Thanks, Jon.

PS. Another way to pose the question would be; what is the IFRAME format to be used in *.markmin files inside the web2py book app to embed youtube videos?

Jon Subscripted

unread,
Apr 1, 2020, 4:00:39 PM4/1/20
to web...@googlegroups.com
Hi,
any suggestions on how to implement this?
Thanks, Jon.
Reply all
Reply to author
Forward
0 new messages