forked from indymedia/epicyon
Append oembed
parent
444137e915
commit
79d9313abd
|
@ -1032,7 +1032,9 @@ def addEmbeddedVideo(content: str,width=400,height=300) -> str:
|
||||||
url=content.split('"'+videoSite)[1]
|
url=content.split('"'+videoSite)[1]
|
||||||
if '"' in url:
|
if '"' in url:
|
||||||
url=url.split('"')[0]
|
url=url.split('"')[0]
|
||||||
content=content+"<center><iframe src=\""+videoSite+url+"\" width=\"50%\" frameborder=\"0\" allowfullscreen></iframe></center>"
|
if not url.endswith('/oembed'):
|
||||||
|
url=url+'/oembed'
|
||||||
|
content=content+"<center><iframe src=\""+videoSite+url+"\" width=\""+str(width)+"\" height=\""+str(height)+"\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe></center>"
|
||||||
return content
|
return content
|
||||||
|
|
||||||
# A selection of the current larger peertube sites, mostly French and German language
|
# A selection of the current larger peertube sites, mostly French and German language
|
||||||
|
|
Loading…
Reference in New Issue