kodi.plugin.video.peertube/resources
Thomas Bétous 89675dfb30 Support better initial download of big videos
In this commit, the new version of vfs.libtorrent is used which
replaces `write()` entirely with `seek()`. Now the size of the
initial chunk that will be downloaded before playback starts is
not defined anymore in vfs.libtorrent, but passed as argument
to `seek()`.
It is quite hard to define how much of a video must be downloaded
before starting the playback because most of the time the chosen
value works great for short videos but not for long videos. It
was decided to define this size based on the duration rather
than on the size of the file. Consequently the user can now
configure in the settings of the add-on of many "seconds" of the
video must be downloaded before the playback starts.

As the configured values is likely to not work properly on all
machines (espcially slow ones), a strategy was implemented to
detect when the playback fails to start because the amount of
the video that was downloaded is not big enough. When it occurs
the user has the choice to try again to play the video or not.
This use case is detected with a combination of the callbacks
`onPlayBackStopped()` and `onAVStarted()` (using
`onPlayBackError()` would have been easier but for some
reason it is not called in this case).

Other changes:
* refactor the play_video action
* clean-up strings and variables that were not used
2021-11-01 15:15:22 +01:00
..
language Support better initial download of big videos 2021-11-01 15:15:22 +01:00
lib Support better initial download of big videos 2021-11-01 15:15:22 +01:00
media Use PeerTube mascot as icon in the notifications 2021-04-28 21:16:20 +00:00
__init__.py Guide the user when libtorrent cannot be imported 2021-04-08 23:25:49 +02:00
icon.png Various small updates before releasing v1.1 2021-04-30 16:35:20 +00:00
settings.xml Support better initial download of big videos 2021-11-01 15:15:22 +01:00