Fixed video dimensions

master
Bob Mottram 2019-08-20 18:38:55 +01:00
parent 50b464049f
commit 05c1c5f860
1 changed files with 2 additions and 2 deletions

View File

@ -1016,14 +1016,14 @@ def addEmbeddedVideo(content: str) -> str:
url=content.split('>vimeo.com/')[1]
if '<' in url:
url=url.split('<')[0]
content=content+"<iframe src=\"https://player.vimeo.com/video/"+url+"\" width=\"100%\" height=\"100%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe>"
content=content+"<center><iframe src=\"https://player.vimeo.com/video/"+url+"\" width=\"100%\" height=\"100%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe></center>"
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+"<center><iframe src=\"https://www.youtube.com"+url+"\" width=\"30%\" height=\"100%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe></center>"
content=content+"<center><iframe src=\"https://www.youtube.com"+url+"\" width=\"300\" height=\"150\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe></center>"
return content
return content