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

fix: reBufferingGoal is not respected #6433

Merged
merged 9 commits into from May 6, 2024

Conversation

Iragne
Copy link
Contributor

@Iragne Iragne commented Apr 10, 2024

Fixes #6355

it's still in draft until having proper unit tests to control this

This PR is doing the following
At startup time and at buffering it will set the playback rate to 0. like it was before and reset it to the default value we no buffer.
I'm still passing all the unit test but i'm still thinging if we have an impact with the live catchup feature that is changing the playback rate.

Maybe we should just re introduce the isBuffering_ value in playbackrate class.
Happy to do it if you think so

here the link the PR that introduce the regression
https://github.com/shaka-project/shaka-player/pull/5696/files#diff-274a4cc3948f85eed18f86e04c6260b93faa97b995d38f0e3b1af618fd01fab7L34

BEGIN_COMMIT_OVERRIDE
chore: Reverted, do not include in release notes
END_COMMIT_OVERRIDE

@Iragne Iragne changed the title fix(Dash) reBufferingGoal is not respected fix(Dash): reBufferingGoal is not respected Apr 10, 2024
@avelad avelad changed the title fix(Dash): reBufferingGoal is not respected fix(DASH): reBufferingGoal is not respected Apr 10, 2024
@avelad avelad changed the title fix(DASH): reBufferingGoal is not respected fix: reBufferingGoal is not respected Apr 10, 2024
@avelad avelad requested a review from joeyparrish April 10, 2024 13:06
@avelad avelad added type: bug Something isn't working correctly priority: P1 Big impact or workaround impractical; resolve before feature release labels Apr 10, 2024
@avelad avelad added this to the v5.0 milestone Apr 10, 2024
@shaka-bot
Copy link
Collaborator

shaka-bot commented Apr 10, 2024

Incremental code coverage: 100.00%

@Iragne Iragne marked this pull request as ready for review April 11, 2024 11:33
@avelad avelad requested a review from theodab April 11, 2024 19:29
lib/player.js Outdated Show resolved Hide resolved
@joeyparrish
Copy link
Member

@avelad, you made the change to stop using playbackRate of 0 to manage buffering state. This would reintroduce a smaller version of that, by explicitly setting playbackRate to 0 when we enter a buffering state, but without so much machinery to manage things. It also has the side-effect of reverting to defaultPlaybackRate after a buffering event, instead of the playbackRate explicitly chosen by the user or by the catch-up logic.

@avelad, I would prefer you look at this and make recommendations.

Change the buffering logic to use isBuffering_
This will not change any playback rate already set
lib/media/play_rate_controller.js Show resolved Hide resolved
lib/media/play_rate_controller.js Outdated Show resolved Hide resolved
@Iragne Iragne requested a review from joeyparrish April 18, 2024 15:28
@Iragne
Copy link
Contributor Author

Iragne commented Apr 22, 2024

@avelad thanks

@avelad
Copy link
Collaborator

avelad commented Apr 22, 2024

@joeyparrish can you review it? Thanks!

@Iragne
Copy link
Contributor Author

Iragne commented Apr 26, 2024

Gentle ask to @joeyparrish if you have time ;) thanks a lot

lib/media/play_rate_controller.js Outdated Show resolved Hide resolved
@avelad avelad removed this from the v4.8 milestone Apr 26, 2024
@avelad avelad added this to the v4.9 milestone Apr 26, 2024
@Iragne Iragne requested a review from theodab April 27, 2024 05:13
@avelad
Copy link
Collaborator

avelad commented Apr 30, 2024

@theodab @joeyparrish can you review it again? Thanks!

@avelad avelad dismissed stale reviews from theodab and joeyparrish May 6, 2024 05:51

Reviewed by Alvaro

@avelad avelad merged commit bfa9b3c into shaka-project:main May 6, 2024
13 of 16 checks passed
avelad pushed a commit that referenced this pull request May 6, 2024
@joeyparrish
Copy link
Member

This appears to be causing test failures on Tizen.

@joeyparrish
Copy link
Member

Specifically, this causes these two failures on Tizen 100% of the time:

Player
    rebufferGoal
      ✗ state orchestration and buffer length [Safari 3.0 (Tizen 3.0)]
	Error: Expected 23.801 to be greater than or equal 25.
	    at <Jasmine>
	    at _callee45$ (test/player_integration.js:1022:34 <- test/player_integration.js:1595:42)
	    at tryCatch (node_modules/@babel/polyfill/dist/polyfill.js:6473:40)
	    at GeneratorFunctionPrototype.invoke [as _invoke] (node_modules/@babel/polyfill/dist/polyfill.js:6[70](https://github.com/shaka-project/shaka-player/actions/runs/8976237248/job/24654981074#step:10:71)2:22)


  Player Src Equals
    ✗ can control trick play rate [Safari 3.0 (Tizen 3.0)]
	Error: Expected 0 to be 2.
	    at <Jasmine>
	    at _callee11$ (test/player_src_equals_integration.js:184:32 <- test/player_src_equals_integration.js:311:40)
	    at tryCatch (node_modules/@babel/polyfill/dist/polyfill.js:64[73](https://github.com/shaka-project/shaka-player/actions/runs/8976237248/job/24654981074#step:10:74):40)
	    at GeneratorFunctionPrototype.invoke [as _invoke] (node_modules/@babel/polyfill/dist/polyfill.js:6702:22)

	Error: Expected false to be true.
	    at <Jasmine>
	    at _callee11$ (test/player_src_equals_integration.js:190:30 <- test/player_src_equals_integration.js:319:38)
	    at tryCatch (node_modules/@babel/polyfill/dist/polyfill.js:6473:40)
	    at GeneratorFunctionPrototype.invoke [as _invoke] (node_modules/@babel/polyfill/dist/polyfill.js:6702:22)

	Error: Expected 0 to be 1.
	    at <Jasmine>
	    at _callee11$ (test/player_src_equals_integration.js:197:32 <- test/player_src_equals_integration.js:327:40)
	    at tryCatch (node_modules/@babel/polyfill/dist/polyfill.js:6473:40)
	    at GeneratorFunctionPrototype.invoke [as _invoke] (node_modules/@babel/polyfill/dist/polyfill.js:6702:22)

As seen here when testing v4.8.2: https://github.com/shaka-project/shaka-player/actions/runs/8976237248/job/24654981074

I am reverting this before v4.8.2 goes out. It has not been in a release yet.

joeyparrish added a commit to joeyparrish/shaka-player that referenced this pull request May 7, 2024
Fixes these failures on Tizen:

Player
    rebufferGoal
      ✗ state orchestration and buffer length [Safari 3.0 (Tizen 3.0)]
  Player Src Equals
    ✗ can control trick play rate [Safari 3.0 (Tizen 3.0)]

This was not in any releases.

Reverts "fix: reBufferingGoal is not respected (shaka-project#6433)"

This reverts commit 99ed5db.

Reopens shaka-project#6355
@joeyparrish
Copy link
Member

Reverted by #6540

joeyparrish added a commit that referenced this pull request May 7, 2024
Fixes these failures on Tizen:

Player
    rebufferGoal
      ✗ state orchestration and buffer length [Safari 3.0 (Tizen 3.0)]
  Player Src Equals
    ✗ can control trick play rate [Safari 3.0 (Tizen 3.0)]

This was not in any releases.

Reverts "fix: reBufferingGoal is not respected (#6433)"

This reverts commit 99ed5db.

Reopens #6355
joeyparrish added a commit that referenced this pull request May 7, 2024
Fixes these failures on Tizen:

Player
    rebufferGoal
      ✗ state orchestration and buffer length [Safari 3.0 (Tizen 3.0)]
  Player Src Equals
    ✗ can control trick play rate [Safari 3.0 (Tizen 3.0)]

This was not in any releases.

Reverts "fix: reBufferingGoal is not respected (#6433)"

This reverts commit 99ed5db.

Reopens #6355
joeyparrish pushed a commit that referenced this pull request May 7, 2024
joeyparrish added a commit that referenced this pull request May 7, 2024
Fixes these failures on Tizen:

Player
    rebufferGoal
      ✗ state orchestration and buffer length [Safari 3.0 (Tizen 3.0)]
  Player Src Equals
    ✗ can control trick play rate [Safari 3.0 (Tizen 3.0)]

This was not in any releases.

Reverts "fix: reBufferingGoal is not respected (#6433)"

This reverts commit 99ed5db.

Reopens #6355
joeyparrish pushed a commit that referenced this pull request May 7, 2024
joeyparrish added a commit that referenced this pull request May 7, 2024
Fixes these failures on Tizen:

Player
    rebufferGoal
      ✗ state orchestration and buffer length [Safari 3.0 (Tizen 3.0)]
  Player Src Equals
    ✗ can control trick play rate [Safari 3.0 (Tizen 3.0)]

This was not in any releases.

Reverts "fix: reBufferingGoal is not respected (#6433)"

This reverts commit 99ed5db.

Reopens #6355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

steaming.rebufferingGoal is being ignored after v4.6.0
5 participants