NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Pause player on internet disconnect and show toast

Open marevm opened this issue 3 years ago • 4 comments

What is it?

  • [ ] Bugfix (user facing)
  • [x] Feature (user facing)
  • [ ] Codebase improvement (dev facing)
  • [ ] Meta improvement to the project (dev facing)

Description of the changes in your PR

  • pauses video player when internet disconnects with ERROR_CODE_IO_NETWORK_CONNECTION_FAILED
  • disables error notification setting isCatchableException = true
  • adds toast method to error util
  • modifies play() to prepare() video if video is not prepared

Before/After Screenshots/Screen Record

  • Before: NewPipeError

NewPipeErrorMessage

  • After: NewPipeNetworkToast

Fixes the following issue(s)

  • Fixes #8898

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

marevm avatar Oct 30 '22 02:10 marevm

@marevm ANU student?

opusforlife2 avatar Oct 30 '22 12:10 opusforlife2

There should be an option whether to pause player or not. Suppose you have an unstable/poor network connection then it will be really annoying to see the player paused every now and then having to click the play button manually.

killerrook avatar Nov 02 '22 01:11 killerrook

There should be an option

Or, depending on what the timeout value is, the player could be set to pause just a little before that duration is completed, and keep trying to load until then.

opusforlife2 avatar Nov 02 '22 19:11 opusforlife2

see the player paused every now and then having to click the play button manually

Have you read 8898? The player closes completely at the moment, so this is already better @marevm ping (feel free to say you don't want to work on this anymore ;-) )

Stypox avatar Dec 18 '22 20:12 Stypox

@marevm ?

opusforlife2 avatar Dec 21 '23 10:12 opusforlife2