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

Handling Recovering After Stalls on Tizen #1839

Closed
skipness opened this issue Mar 13, 2019 · 12 comments
Closed

Handling Recovering After Stalls on Tizen #1839

skipness opened this issue Mar 13, 2019 · 12 comments
Labels
platform: TV/STB Issues affecting smart TV or set-top box platforms status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@skipness
Copy link

skipness commented Mar 13, 2019

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

What version of Shaka Player are you using? 2.4.7

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? Yes

What browser and OS are you using? Tizen 3 & Tizen 4

For embedded devices (smart TVs, etc.), what model and firmware version are you using? UA40MU6310 (Tizen 3 / Software Version: T-KTMDCNC - 1262.0)
UA43NU7100 (Tizen 4 / Software Version: T-KTM2LDCNC - 1202.6)

What are the manifest and license server URIs? I cannot provide, sorry.

What did you do?

  1. Play stream on TV

  2. Make some seek by changing currentTime

What did you expect to happen?
After seeking, stream can be play smoothly

What actually happened?
Sometimes stream will be stall after seeking, stream resume normal after trigger a play/pause or seek again.

I found that the fix suggested from #1704 can fix the above issue too by adding the following code in stall_detector.js:

if (shaka.util.Platform.isTizen()) { return false; }
@kevinscroggins-youi
Copy link

I have also seen video stalls on Tizen TVs with very specific firmware that the normal stall detection handling did not fix. We were able to recover playback by pausing and then trying to play the video again, and as such we ported the stall detection code app-side and changed the stall handling to pause and play the video instead. Sounds similar to what you are seeing, so perhaps it may be of interest to introduce separate handling for stall handling on Tizen versus any other platform that invokes a pause / play on the player, unless there is a better solution.

@kevinscroggins-youi
Copy link

Also, you may want to update your ticket as you have listed the TV models instead of the actual firmware information. You will want to go to Settings / Support / About this TV to retrieve this information. :)

@vaage
Copy link
Contributor

vaage commented Mar 18, 2019

Thank you @skipness for filing this issue. Thank you @kevinscroggins-youi for helping out.

I am putting together a change that will make the stall detector configurable via Player.configure. My hope is this will make these types of problems easier to work around and allow the community to experiment with different configurations, allowing us to find the ideal configuration for different platforms.

The three configurable attributes I am looking to expose are:

  • Enabled : A flag for whether or not the player should initialize and use a stall detector.
  • Threshold : The number of seconds that must pass without progress before firing the stall-event.
  • Skip : The number of seconds to skip forward after a stall-event.

@skipness, what do you think of this solution? Since we don't have a good way to reproduce TV issues, once the change has been submitted, I will likely rely on you to verify that it allows you to work around the issue on Tizen.

@vaage vaage added type: enhancement New feature or request and removed needs triage labels Mar 18, 2019
@vaage vaage self-assigned this Mar 18, 2019
@vaage vaage changed the title Stall on TizenOS Make Stall Detector Configurable Mar 18, 2019
@vaage vaage added this to the v2.5 milestone Mar 18, 2019
@skipness
Copy link
Author

@kevinscroggins-youi Thanks for reminding, I have updated the ticket.
@vaage This solution sounds good. Sure! Once the change is out, I will test it and update you.

shaka-bot pushed a commit that referenced this issue Mar 20, 2019
Make the stall detector configurable via Player.configure. This
should make it easier for developers to work around stall issues
and make it easier for us to find ideal configuration for
different platforms.

This exposes:

- Enabled   : A flag for whether or not the player should
               initialize and use a stall detector.

- Threshold : The number of seconds that must pass without
               progress before firing the stall-event.

 - Skip     : The number of seconds to skip forward after a
              stall-event.

To make enable possible, the stall detector was made optional and
is now passed into the gap jumper. This allows Playhead to evaluate
the config and create the detector as desired.

Issue #1839

Change-Id: Ife1bf34b4cfc7b469f4b0beb312a06d5b5cd81a9
@vaage
Copy link
Contributor

vaage commented Mar 20, 2019

@skipness, the change has been submitted, so the configuration should be available.

Here are the calls that you can use to change the various elements of it. Could you play with different values and left us know which combination worked best on TIZEN?

// Default settings
player.configure('streaming.stallEnabled', /* enabled= */ true);
player.configure('streaming.stallThreshold', /* seconds= */ 1.0);
player.configure('streaming.stallSkip', /* seconds= */ 0.1);

@vaage vaage added platform: TV/STB Issues affecting smart TV or set-top box platforms status: waiting on response Waiting on a response from the reporter(s) of the issue labels Mar 20, 2019
@shaka-bot
Copy link
Collaborator

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

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Mar 27, 2019
@kevinscroggins-youi
Copy link

@vaage Great! Thank you for this! Unfortunately based on my experience, the current method of recovering from stalls does not work on Tizen. The only thing that did work was pausing and after a 1tick delay, playing the video. I'm not sure if there is a better solution, but it would appear as though Tizen may require special handling for this situation. In our case, we only observed this behaviour specifically when backgrounding and restoring our application on a very specific 2018 Tizen TV. We have two other 2018 Tizen TVs that did not exhibit this behaviour. Hope this information is useful. I'm not entirely confident that this feature will fully resolve this issue.

@kevinscroggins-youi
Copy link

@shaka-bot reopen

@vaage
Copy link
Contributor

vaage commented Mar 28, 2019

@kevinscroggins-youi in your original post, you said that not using stall detection resolved the issue for you. Is that still a viable option for you? If so, the configuration exposed the option for you to disable it when running on Tizen. If not, what is missing from Shaka Player to handle your use case?

@vaage vaage changed the title Make Stall Detector Configurable Handling Recovering After Stalls on Tizen Mar 28, 2019
@skipness
Copy link
Author

@vaage
Hey sorry for late response. I think the default setting is good enough for now, seeking seems working perfectly.

@kevinscroggins-youi
Copy link

@vaage I did not, that was @skipness who indicated that disabling the stall detector fixed the stall from occurring. In my case, having the stall detector with alternate behaviour for pausing and then quickly playing the video fixed the stall on my end. I was experiencing a stall when restoring the application from the background on DRM encoded VOD playback specifically. I only saw it on a single 2018 device, so I will try to track that device down and test with this fix early next week and get back to you. Thanks for the follow up!

@joeyparrish joeyparrish reopened this Mar 29, 2019
@kevinscroggins-youi
Copy link

@vaage I tested our app using the latest version of Shaka on the affected 2018 TV and it appears that the video playback no longer stalls on startup in general, so perhaps some other change may have unintentionally fixed this. In any case, I think it's safe to say that this is definitely fixed. Thanks!

@vaage vaage closed this as completed Apr 1, 2019
@shaka-project shaka-project locked and limited conversation to collaborators May 31, 2019
@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
platform: TV/STB Issues affecting smart TV or set-top box platforms status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants