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:
parent
3f2266e254
commit
412ce067b6
2 changed files with 19 additions and 19 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue