2017-09-22, 01:52
Hi all,
I need some help with getting the python code to work after when I set the video to a full screen mode.I have a trouble with calling onAction function, when I pressed on the enter button it will start to play the video stream and when I pressed on the enter button again it will set the video to a full screen mode as it will be calling onAction function without have any problem. When I pressed on the backspace button, it will set the video to a normal screen mode but it won't be calling onAction function unless when I have to press backspace button again.
If I don't set the video to a full screen just a normal video mode, I can be able to call onAction function without have any problem when I press on the up, down, left, right arrow and backspace buttons of the keyboard. I can't be able to find out why it would not let me to call onAction function when I set the video to full screen mode and then set the video to a normal screen mode when I pressed on the backspace button. I think something have to do with video control issue but I am not too sure why.
I am using videowindows control on my skinning so I can watch the small video by using this:
Here is the code that I use to run on python:
How I can be able to call onAction function when I set the video to a full screen mode and then set to a normal screen mode?
Do I need to create a custom video windows so I could be able to call onAction function or what?
I need some help with getting the python code to work after when I set the video to a full screen mode.I have a trouble with calling onAction function, when I pressed on the enter button it will start to play the video stream and when I pressed on the enter button again it will set the video to a full screen mode as it will be calling onAction function without have any problem. When I pressed on the backspace button, it will set the video to a normal screen mode but it won't be calling onAction function unless when I have to press backspace button again.
If I don't set the video to a full screen just a normal video mode, I can be able to call onAction function without have any problem when I press on the up, down, left, right arrow and backspace buttons of the keyboard. I can't be able to find out why it would not let me to call onAction function when I set the video to full screen mode and then set the video to a normal screen mode when I pressed on the backspace button. I think something have to do with video control issue but I am not too sure why.
I am using videowindows control on my skinning so I can watch the small video by using this:
Code:
<control type="videowindow">
<posx>822</posx>
<posy>45</posy>
<width>432</width>
<height>225</height>
<animation type="Conditional" condition="!Control.IsVisible(389)">
<effect type="zoom" end="100" center="822,45" time="500" />
</animation>
</control>
Here is the code that I use to run on python:
Code:
def playStreamUrl(self):
print "you are calling playStreamUrl...................................."
FullScreen = ADDON.getSetting('FullScreen.enabled') == 'true'
if ! self.player.isPlaying():
if FullScreen == False:
self.player.play(item = stream_url, windowed = True)
isPlaying = True
xbmc.executebuiltin("xbmc.ActivateWindow('video')")
ADDON.setSetting('FullScreen.enabled', 'false')
else:
if FullScreen == False:
xbmc.executebuiltin("Action(Fullscreen)")
ADDON.setSetting('FullScreen.enabled', 'true')
self.getControl(1).setVisible(False)
def onAction(self, action):
print "you are calling onAction...................................."
FullScreen = ADDON.getSetting('FullScreen.enabled') == 'true'
if action == ACTION_BACKSPACE:
print "ACTION_BACKSPACE.......................passed 1"
if allchannels_enabled == 'true':
print "ACTION_BACKSPACE passed ......................................1"
if self.player.isPlaying():
if FullScreen == False:
self.getControl(1).setVisible(True)
if action == ACTION_ENTER:
if allchannels_enabled:
if self.channels_Index != len(self.program_buttons) - 1:
self.playStreamUrl()
How I can be able to call onAction function when I set the video to a full screen mode and then set to a normal screen mode?
Do I need to create a custom video windows so I could be able to call onAction function or what?