From 8ab8ddb8a0c2458e5fcc23873f3cc1604b3c1965 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 20 Aug 2019 19:18:04 +0100 Subject: [PATCH] Width and height --- webinterface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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