语言

Menu
Sites
Language
When watching video(html5) mobile device enters into sleep mode after 10-20 minuets

When I've tried to publish my tizen web app I was rejected. There is the purpose:

Defect

The application goes to sleep mode even if it is executed without touch.

Procedure

  1. Execute the ->Start to watch some movie
  2. Do not touch the screen
  3. Check whether the application goes to sleep mode

Expected Result

The application should not go to sleep mode because the user wants to execute it without touch.

I think that this is a tizen webkit bug. Nevertheless I've tried to request CPU_AWAKE and SCREEN_NORMAL power state programmatically. And this wasn't helped to me. Is this really a bug or I do something wrong?

Device: Ref.Device-PQ. Tizen version: 2.2.0

 

 

 

 

 

 

Yes It works fine but when watching video doesn't works fine. After some time screen turns off. Try to watch some film for continious time (for example 1 - 2 hours). If web app runtime and tizen browser have equal webkit I think you can test it here: http://www.zoomby.ru/mobile/watch/millioner-iz-truscheb. Simply start watching video. In all other platforms(android, ios, desctop) screen doesn't turn off. But in Tizen screen turns off. I think this is a bug. And also I can give yoy my web app and you can test it on tizen web runtime. 

By the way I use power api in this way:

tizen.power.request("SCREEN", "SCREEN_NORMAL");
tizen.power.request('CPU', 'CPU_AWAKE');                

var _onTimeUpdate = function(){
     tizen.power.request("SCREEN", "SCREEN_NORMAL");
     tizen.power.request('CPU', 'CPU_AWAKE');
 };
video.on('timeupdate', _onTimeUpdate);

 

// comment: on opening page containing video element I request power states SCREEN_NORMAL and CPU_AWAKE (I won't release for test purpose). Also I request those powser states on timeupdate because I've noticed that when video plays\pauses power state releases.

 

P.S.: I've noticed that even when I requst power state SCREEN_NORMAL and CPU_AWAKE and not RELEASE them and when bug occurs (when watching video screen turns off) CPU whatever works without sleep. It's obviosly because in this state (screen off and video doesn't plaing) my 100% charged battery is down in 1-2 ours.

编辑者为: deser 19 5月, 2014

响应

1 回复
Adnan Maruf

As Tizen 2.2.0 can't be checked now, I checked with Tizen 2.4. I couldn't found your mentioned issue on 2.4 i.e. video is running continuously without turning screen off. So, your workaround (using power API to keep screen on) wouldn't be necessary. Simply play video using HTML5. for example:

<video width="your_video_width" controls>
<source src="path/to/the/video" type="video/mp4">
</video>