Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 57af4023 authored by mtk08122's avatar mtk08122 Committed by Jose Cubero
Browse files

Fix abnormal consumption of mobile data

Problem: When user is watching http live streaming video, user does some
operation to let browser run in the background, but mobile data is still
consumed abnormally.

Root cause: When browser runs in the background, browser will call
mediaplayer pause function, which would pause video renderer. But if network
speed is fast and buffered data is more than PlaylistFecher::
kMinBufferedDurationUs, data can't be consumed and it will call
postMonitorQueue() frequently after delayUS time's up. At this time, if http
server returns error when refreshPlaylist, delayUs will be 0 because
mLastPlaylistFetchTimeUs is not updated, which will cause postMonitorQueue
and refreshPlaylist more frequently, and consumes more mobile data.

Solution: On PlaylistFetcher::onMonitorQueue(), if refreshPlaylist returns
error, it calls notifyError and then end this playback.

Bug: 123665682
Test: play http live streaming video, pause this playback, then close Wi-Fi
to simulate accessing http server error

Change-Id: Ic30d446d1ab6e34ac3e5ef414c2e71a09c296f92
(cherry picked from commit 4ae6a2ab)
parent 482f60cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment