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

IA does not expose playback errors using onPlayBackError() #497

Open
dagwieers opened this issue Aug 13, 2020 · 7 comments
Open

IA does not expose playback errors using onPlayBackError() #497

dagwieers opened this issue Aug 13, 2020 · 7 comments
Labels
Issue Type: New feature issue has requested a new feature require discussion

Comments

@dagwieers
Copy link
Contributor

dagwieers commented Aug 13, 2020

This is an important problem for many add-ons, if playing a stream fails by IA for whatever reason (authentication issue, license issue, any HTTP issue, format error or Widevine library issue) this is not reported back to the add-on. As a result an add-on cannot report this failure properly to the user, or implement a work-around (in case this is a known/expected issue). add-ons/plugin.video.vrt.nu#727

ISH (InputStream Helper) could use specific license or Widevine issues as an event for e.g. updating the Widevine library, and therefore would not need to check for newer Widevine libraries on every call (or after some TTL has expired). This would be a much better user experience. emilsvennesson/script.module.inputstreamhelper#69)

@CastagnaIT
Copy link
Collaborator

i have investigated on this problem, because i have similar problem on netflix

the results are that ISA provide the right value to Kodi when going in error then the problem is not in ISA,
after check che Kodi Player core i see that completely is missing the error notification event

i built a Kodi W64 build, from a first test with netflix Monitor seem now works, please test with your VRT addon:
https://www.dropbox.com/s/kvdr8j7cgkrhbma/Kodi19_Win64_Patch_PlayerEventError.zip?dl=0

if go well i will try to do a PR
let me know

@dagwieers
Copy link
Contributor Author

@CastagnaIT This is an important one indeed, it would be nice to see this fixed in Matrix. We may have to discuss the best interface for add-ons in this case.

  • What information do we return, in what format?
  • Do we have different callback handlers for different types of errors or not?

It would be nice to look at all the use-cases to ensure that our design is the most convenient for add-on developers. Maybe I am a bit over-concerned here, but I am very sensitive to consider all use-cases and at least try to have the best design from the very start.

@CastagnaIT
Copy link
Collaborator

We may have to discuss the best interface for add-ons in this case.
What information do we return, in what format?
Do we have different callback handlers for different types of errors or not?

what are you referring to?
I don't think i understand well what you're trying to explain

@dagwieers
Copy link
Contributor Author

You have different kinds of errors, and they have different information they can return, and we should have a good idea of the range of errors and the type of information that is returned, and how add-ons would be interacting with it. Look at the description of the issue and two specific use-cases we have. Maybe there are more?

@CastagnaIT
Copy link
Collaborator

Ah your idea is would return a code and/or description of the error in the onPlayBackError() notification
like

onPlayBackError(data)
code = data['err_code']

could be useful, but not easy to implement,
this callback is inside Application.cpp then can be called by all type of "core players" inside "cores" folder,
our case is only "VideoPlayer" core, but cover a lot of playable things.... dvd, files, streams, inputstreams, etc...

this could means add this support only for InputStream case,
might be a start to make this optional,
but before you start making changes you should ask to Kodi devs to know what they think of this

modify the IA interface to allow pass the error code from ISA to Kodi core
requires a bit of work because you can't pass the string directly to Application.cpp

Another problem is handle the streams errors, that could happen when while watching a video, currently are not good managed.
So if example internet connection is lost while watching the video, ISA raise error, but kodi instead will not receive anymore the buffer and Kodi will think that the video have reach the end and stop the video correctly,
but this case must be fixed also without implement all this

@dagwieers
Copy link
Contributor Author

I don't know what the best way forward is to capture all of the possible errors, but we do need some of those details to act upon.
I am sure @peak3d knows best what is needed here (if he is aware of all the possible fail scenarios add-on devs are interested in).

We already discussed it once briefly (which is why I opened this ticket here).

@dagwieers
Copy link
Contributor Author

We have a new use-case for better onPlayBackError() support from inputstream.adaptive: emilsvennesson/script.module.inputstreamhelper#441 (comment)

If ISA can escalate issues loading the Widevine CDM, ISH can act on this and provide a solution, this would avoid any ugly workarounds to detect an incompatibility between Kodi and Widevine CDM.

Other use-cases:

  • A revoked Widevine CDM (could trigger an update, avoids updating pro-actively and potentially breaking a working setup)
  • Other DRM-related issues that now result in silent failures and no clue to users how to resolve it (where ISH or the add-on can offer an alternative solution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue Type: New feature issue has requested a new feature require discussion
Projects
None yet
Development

No branches or pull requests

3 participants