Video kivy

42 views
Skip to first unread message

Degenerate Tech

unread,
Apr 30, 2020, 9:00:36 AM4/30/20
to Kivy users support
sir i have written a video player app using kivy widgets ..it running well in desktop and android
but in android ,,,screen backlight is turned off after 30sec as i have set in android's setting ...so problem is when i start video play. After 30 sec it is getting off..
i want to do screen light at on state while playing video...HOW TO DO THIS please help 

Degenerate Tech

unread,
Apr 30, 2020, 9:26:53 AM4/30/20
to Kivy users support
how to change kivy app sleeping time?

Moqing Yu

unread,
Apr 30, 2020, 12:22:01 PM4/30/20
to kivy-...@googlegroups.com
Assume self.video is Video instance, bind the "on_state" event like this

from kivy.core.window import Window
.......
    self.vidoe.bind(on_state=self.on_state)

def on_state(self, o, v=None):
    if self.vidoe.state == 'play':
        Window.allow_screensaver =Fasle
    else:
       Window.allow_screensaver = True

Degenerate Tech <sksah...@gmail.com> 于2020年4月30日周四 下午9:26写道:
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/84aa1ae6-0afa-425b-a91e-af155dacd35d%40googlegroups.com.
Message has been deleted

Degenerate Tech

unread,
Apr 30, 2020, 2:57:52 PM4/30/20
to Kivy users support
on_state do not calling the self.on_state function

Degenerate Tech

unread,
Apr 30, 2020, 2:59:16 PM4/30/20
to Kivy users support
But Window.allow_screensaver is working...I have called it via a button..

Degenerate Tech

unread,
Apr 30, 2020, 6:00:58 PM4/30/20
to Kivy users support
oh I got it..it will be
self.vid.bind(state=self.on_state)
..Okk Thank you sir ...😀😀😀

Moqing Yu

unread,
May 3, 2020, 11:48:15 AM5/3/20
to kivy-...@googlegroups.com
glad it work

Degenerate Tech <sksah...@gmail.com> 于 2020年5月1日周五 上午6:01写道:
oh I got it..it will be
self.vid.bind(state=self.on_state)
..Okk Thank you sir ...😀😀😀

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages