Then simply put self.setAspect(0) in the def __init__ sub,zero mean aspect ration 4:3,every time you open the freeplayer your aspect ratio chosen automatically
class FreePlayer(Screen):
def __init__(self, session,openmovie,opensubtitle,media):
self.media = media
self.session = session
self.frameon = 1 / 24
self.seeksubtitle = 0
self.nrsubtitle = 0
self.enablesubtitle = True
self.statesubtitle = "Show"
self.stateplay = "Stop"
self.stateinfo = "Hide"
#self.stateinfo = "Time1"
self.oldinfo = ""
self.openmovie = openmovie
self.opensubtitle = opensubtitle
self.subtitle = []
self.fontpos = 540
self.fontsize = 60
self.fontpos_ = self.fontpos
self.fontsize_ = self.fontsize
self.fonttype_nr = 0
self.fonttype_nr_ = self.fonttype_nr
self.fontcolor_nr = 0
self.fontcolor_nr_ = self.fontcolor_nr
self.borderWidth = 3
self.borderWidth_ = self.borderWidth
self.loadfont()
self.loadcolor()
self.loadconfig()
if self.opensubtitle == "": self.enablesubtitle = False
print "FontPos = ",self.fontpos
print "FontSize = ",self.fontsize
print "FontType = ",self.fonttype_nr
print "FontColor = ",self.fontcolor_nr
print "borderWidth = ",self.borderWidth
print "OpenMovie : ",self.openmovie
print "OpenSubtitle : ",self.opensubtitle
self.skin = """
<screen name="FreePlayer" position="0,0" size="1280,720" flags="wfNoBorder" backgroundColor="transparent">
<widget name="i1" position="0,540" size="1280,300" valign="bottom" halign="center" font="%s;%d" backgroundColor="transparent"/>
<widget name="info1" position="15,15" size="825,50" halign="left" valign="top" font="Regular;40" backgroundColor="transparent"/>
<widget name="info2" position="845,15" size="420,50" halign="right" valign="top" font="Regular;40" backgroundColor="transparent"/>
</screen>""" % (self.fonttype_list[self.fonttype_nr],self.fontsize)
Screen.__init__(self, session)
self["i1"] = Label()
self["info1"] = Label()
self["info2"] = Label()
self["actions"] = ActionMap(["FreePlayerActions"],
{
"ok": self.Ok,
"cancel": self.Exit,
"up": self.up,
"down": self.down,
"left": self.left,
"right": self.right,
"stop": self.Exit,
"pause": self.pause,
"play": self.play,
"info": self.info,
"key3": self.key3,
"key6": self.key6,
"key9": self.key9,
"key1": self.key1,
"key4": self.key4,
"key7": self.key7,
"channelup": self.channelup,
"channeldown": self.channeldown,
"red": self.play,
"green": self.pause,
"yellow": self.Exit,
"blue": self.color,
"text": self.text,
"key0": self.bWidth,
"star": self.av,
"audio": self.audioselect,
"menu": self.menu
},-2)
self.setAspect(0)
self.ServiceName = ""
self.onShown.append(self.__LayoutFinish)
self.onClose.append(self.__onClose)
self.old_policy = self.getPolicy()
self.tout = eTimer()
self.tout.callback.append(self.toutEvent)
# self.tout.start(2000,false)
self.tinfo = eTimer()
self.tinfo.callback.append(self.tinfoEvent)
Edited by mfaraj57, 16 November 2014 - 22:56.