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

Stall detector cause the error "The play() request was interrupted by a call to pause()" on SmartTV #2920

Closed
Yuvalke opened this issue Oct 19, 2020 · 11 comments
Labels
platform: Tizen Issues affecting Tizen platform: TV/STB Issues affecting smart TV or set-top box platforms platform: WebOS Issues affecting WebOS priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@Yuvalke
Copy link

Yuvalke commented Oct 19, 2020

Have you read the FAQ and checked for duplicate open issues?
Yes.

What version of Shaka Player are you using?
3.0.5

Can you reproduce the issue with our latest release version?
yes.

Can you reproduce the issue with the latest code from master?
yes.

Are you using the demo app or your own custom app?
custom app.

If custom app, can you reproduce the issue using our demo app?
Didn't try the demo app on the TV.

What browser and OS are you using?
SmartTV - LG and Samsung.

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Tizen 4.

What are the manifest and license server URIs?

What did you do?
call play() and before play promise resolved stall detector request for pause and cause the DOM exception.

What did you expect to happen?
play promise will resolve.

What actually happened?
Getting error from play promise.

Yuvalke added a commit to Yuvalke/shaka-player that referenced this issue Oct 19, 2020
Avoid pause request when play still in process.
@OrenMe
Copy link
Contributor

OrenMe commented Oct 25, 2020

Hi, any update on this issue - this is causing streams to halt on start and require user to press play again.

@TheModMaker
Copy link
Contributor

Is this an actual exception? The log "a call to play was interrupted by a call to pause" isn't an error, it is just a rejected Promise from the play call. We don't actually use the Promise, so it shouldn't cause any problems for us. If you're app is seeing this error from your calls to play, then you can just catch and ignore it. Waiting for the Promise from play() isn't really needed and you could use the play event instead.

@joeyparrish
Copy link
Member

@Yuvalke
Copy link
Author

Yuvalke commented Oct 26, 2020

Hi, @joeyparrish and @TheModMaker thanks for your response.
The play promise has valuable info, we get info when the media couldn't play for example "user gesture" for autoplay on
few devices, in this case, the video tag paused property set to false but the media couldn't play so pause request is needed after that error to correlate the state.
The play promise AFAIK relevant for first play request only and the specific scenario happens on smartTV and cast only on a stall detector.
I suggested checking if we're in a playing state or not before we're making the pause request, another possible solution could be listening to the playing event, only after that start the stall detector process for smartTV and cast, what do you think?

@TheModMaker
Copy link
Contributor

The problem with waiting is we've seen stalls happen at the start before. Sometimes the media pipeline gets stuck at the start. There are a few configuration params you could change to make this better:

  • streaming.stallEnabled: If set to false, never trigger the stall detector.
  • streaming.stallThreshold: The amount of time to wait before detecting a stall. Setting this to a larger value will cause us to wait longer and not trigger early at the start.
  • streaming.stallSkip: Defines the amount of time to skip forward. If 0, we'll play/pause, otherwise we'll skip this amount forward. You could set this to 0.1 to cause a seek instead.

@Yuvalke
Copy link
Author

Yuvalke commented Oct 29, 2020

@TheModMaker It gets stuck before playing event?
Another solution could be to set the stallSkip to 0 on playing the event for smartTV instead set it at the beginning, it'll make the first play promise to never reject, and the stall detector will keep working as it was.
stall detector fixes some issues on smartTV with pause play, I don't want to miss this fix.

@Yuvalke
Copy link
Author

Yuvalke commented Nov 5, 2020

@TheModMaker what do you think about the fix I suggested?

@joeyparrish joeyparrish added the platform: TV/STB Issues affecting smart TV or set-top box platforms label Jan 6, 2021
@joeyparrish
Copy link
Member

@Yuvalke, I apologize for leaving this issue for so long without updates. Is this still an issue for you? Did you try your suggestions above with stallSkip?

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Feb 16, 2021
@Yuvalke
Copy link
Author

Yuvalke commented Feb 17, 2021

Hi @joeyparrish, I saw issues solved around this config for SmartTV so I want to keep your logic working, I implemented a quick fix configure stallSkip with the default value(0.1) and waiting to playing event and configure the stallSkip value that set for this Environment - I wonder if you can export your default config before Environment changes taking into account so I'll be able to apply your default config(to prevent issues when default value will change).

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Feb 17, 2021
@joeyparrish joeyparrish added type: bug Something isn't working correctly priority: P3 Useful but not urgent and removed needs triage labels Aug 10, 2021
@shaka-bot shaka-bot added this to the v3.3 milestone Aug 11, 2021
@avelad avelad modified the milestones: v3.3, v4.1 May 4, 2022
@avelad avelad modified the milestones: v4.1, v4.2 Jun 3, 2022
@avelad avelad added platform: WebOS Issues affecting WebOS platform: Tizen Issues affecting Tizen labels Jun 13, 2022
@avelad avelad modified the milestones: v4.2, v4.3 Aug 17, 2022
@avelad avelad modified the milestones: v4.3, v4.4 Nov 11, 2022
@avelad
Copy link
Member

avelad commented Feb 9, 2023

Can you test with v4.3.4? Thanks!

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Feb 9, 2023
@github-actions
Copy link
Contributor

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.

@github-actions github-actions bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Feb 16, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Apr 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: Tizen Issues affecting Tizen platform: TV/STB Issues affecting smart TV or set-top box platforms platform: WebOS Issues affecting WebOS priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

6 participants