Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handles sleep mode better on Mac #352

Closed
xhwang-chromium opened this issue Apr 22, 2016 · 12 comments
Closed

Handles sleep mode better on Mac #352

xhwang-chromium opened this issue Apr 22, 2016 · 12 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@xhwang-chromium
Copy link

Repro steps:

  1. Start a playback using Widevine on Chrome for Mac
  2. Enter sleep mode
  3. Wait for a few minutes
  4. Exit sleep mode

Observed Result:
Playback stops with "Error code 1002".

Expected Result:
Playback should resume after exiting sleep mode.

@tdrews tdrews added the type: enhancement New feature or request label Apr 25, 2016
@joeyparrish joeyparrish self-assigned this May 3, 2016
@joeyparrish
Copy link
Member

joeyparrish commented May 3, 2016

Error 1002 is because of a failed XHR. I suspect that the default retry parameters are to blame. I would guess that this would be resolved if we set the default to at least 2 attempts. The first request, interrupted by sleep, would fail. The second request, initiated after wakeup, would succeed.

@xhwang-chromium, can you please test this theory? Open the demo app, then open the JS console. In the console, run this:

shakaDemo.player_.configure({streaming:{retryParameters:{maxAttempts:2}}});
shakaDemo.player_.configure({manifest:{retryParameters:{maxAttempts:2}}});
shakaDemo.player_.configure({drm:{retryParameters:{maxAttempts:2}}});

Then load an asset and repeat your sleep test. Thanks!

@xhwang-chromium
Copy link
Author

Thanks joeyparrish for the tips. I tried it but it seems shakaDemo isn't defined:

Uncaught ReferenceError: shakaDemo is not defined(...)

@joeyparrish
Copy link
Member

What URL are you using? Are you building and running Shaka locally or using our appspot demo?

@xhwang-chromium
Copy link
Author

I was clicking the "demo app" link you provided above.

@joeyparrish
Copy link
Member

I'm sorry, I think I made a mistake in the link. I edited that comment to correct, but here it is again for convenience: http://shaka-player-demo.appspot.com/demo/

@xhwang-chromium
Copy link
Author

Thanks! I tried it. After exiting sleep mode, the video paused for a few seconds, and finally resumes to play. But after a while it stopped again.

So it's improved, but seems still need to polish.

@joeyparrish
Copy link
Member

Okay, thanks for sanity-checking my guess. I'm traveling and don't have access to a Mac right now, but we'll try to make time to fix this before we release v2.0.0. Thanks!

@joeyparrish joeyparrish added this to the v2.0.0 milestone May 4, 2016
@joeyparrish joeyparrish removed their assignment May 4, 2016
@TheModMaker
Copy link
Contributor

Recently we have made some updates to the network stability (#390). Can you try again from master to see if they fixed your problems? They helped in my testing.

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 2, 2016
@joeyparrish
Copy link
Member

I re-tested this on the nightly build. Here's what I did:

  1. Load nightly build on Chrome on Mac
  2. Choose "Sintel 4k" and start playback
  3. Wait about 30 seconds
  4. Close the laptop
  5. Wait 2 minutes
  6. Open the laptop

Playback continues, with audio initially playing catching up to a still video frame. After that, video plays in sync. (I imagine this catch-up phase has something to do with Chrome's media pipeline on OSX, but it's definitely outside the control of Shaka.)

Playback does not, however, continue to the end of the stream. At some point, it stops. Not sure why. I haven't looked at the Network panel in the developer tools, nor have I tried this with verbose logging.

@joeyparrish joeyparrish removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 13, 2016
@xhwang-chromium
Copy link
Author

Could you please try the latest M52/M53 build which should have a fix
https://codereview.chromium.org/2072843002 in Chrome on this issue? If it
works well, then this issue should be marked as wontfix :)

On Wed, Jul 13, 2016 at 9:29 AM, Joey Parrish notifications@github.com
wrote:

I re-tested this on the nightly build. Here's what I did:

  1. Load nightly build
    http://nightly.shaka-player-demo.appspot.com/demo/ on Chrome on Mac
  2. Choose "Sintel 4k" and start playback
  3. Wait about 30 seconds
  4. Close the laptop
  5. Wait 2 minutes
  6. Open the laptop

Playback continues, with audio initially playing catching up to a still
video frame. After that, video plays in sync. (I imagine this catch-up
phase has something to do with Chrome's media pipeline on OSX, but it's
definitely outside the control of Shaka.)

Playback does not, however, continue to the end of the stream. At some
point, it stops. Not sure why. I haven't looked at the Network panel in the
developer tools, nor have I tried this with verbose logging.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#352 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AJssXnVJC6rQ0gJ-gGWTbgv9kF0rgC_sks5qVRJ-gaJpZM4IN9tz
.

@joeyparrish
Copy link
Member

@ismena, please retest with latest Shaka Player & latest Chrome stable (52).

@ismena
Copy link
Contributor

ismena commented Aug 22, 2016

Tried with Shaka nightly build and Chrome 52. Confirm that the issue doesn't repro: after opening the laptop the playback continues and successfully plays to the end.

@ismena ismena closed this as completed Aug 22, 2016
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants