diff --git a/webinterface.py b/webinterface.py index 3dbc2258..7068f38e 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1009,21 +1009,21 @@ def htmlRemplaceEmojiFromTags(content: str,tag: {}) -> str: content=content.replace(tagItem['name'],emojiHtml) return content -def addEmbeddedVideo(content: str) -> str: +def addEmbeddedVideo(content: str,width=400,height=300) -> str: """Adds embedded videos """ if '>vimeo.com/' in content: url=content.split('>vimeo.com/')[1] if '<' in url: url=url.split('<')[0] - content=content+"
" + content=content+"
" return content if '"https://www.youtube.com' in content: url=content.split('"https://www.youtube.com')[1] if '"' in url: url=url.split('"')[0].replace('/watch?v=','/embed/') - content=content+"
" + content=content+"
" return content # A selection of the current larger peertube sites, mostly French and German language @@ -1034,7 +1034,7 @@ def addEmbeddedVideo(content: str) -> str: url=content.split('"https://'+site)[1] if '"' in url: url=url.split('"')[0].replace('/watch/','/embed/') - content=content+"
" + content=content+"
" return content return content