1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

Use resolution provided to resize viewer

This commit is contained in:
albfan 2016-07-23 19:15:38 +02:00
parent 3f2266e254
commit 412ce067b6
2 changed files with 19 additions and 19 deletions

View file

@ -19,12 +19,14 @@ Gst.init(None)
class Player(object):
def __init__(self, **kwargs):
resolution = kwargs.get("resolution")
if resolution:
split = resolution.split("x")
self.width = int(split[0])
self.height = int(split[1])
scale = kwargs.get("scale")
#scale = "1080x1920"
if not scale:
self.width = 800
self.height = 600
else:
if scale:
split = scale.split("x")
self.width = int(split[0])
self.height = int(split[1])