set dimensions on oembed

This commit is contained in:
Roy Olav Purser 2021-05-13 15:16:40 +02:00
parent 33e487d02c
commit e1ef84153a
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -193,8 +193,10 @@ class MainHandler(tornado.web.RequestHandler):
embed_json = {}
embed_json["version"] = "1.0"
embed_json["type"] = "video"
embed_json["width"] = "640"
embed_json["height"] = "360"
embed_json["html"] = str(template_embed.generate(origin=origin, provider=provider), "utf-8")
self.set_header("Content-Type", "application/json+oembed; charset=utf-8")
self.set_header("Content-Type", "application/json; charset=utf-8")
self.write(json.dumps(embed_json))
def handle_stream(self, provider, write):