mirror of https://github.com/FreeTubeApp/FreeTube
Utils+Everywhere: Add a start offset tolerance for the external player (#2326)
If a current video is practically over or the value in the history's watch progress is almost the same as the length of the video, it's safe to deduce that if the external player button is clicked, the user is most likely just rewatching the video, making no sense to pass a start offset to it
This commit is contained in:
parent
d1fc87da44
commit
c9c6b38627
|
@ -252,6 +252,7 @@ export default Vue.extend({
|
|||
watchProgress: this.watchProgress,
|
||||
playbackRate: this.defaultPlayback,
|
||||
videoId: this.id,
|
||||
videoLength: this.data.lengthSeconds,
|
||||
playlistId: this.playlistId,
|
||||
playlistIndex: this.playlistIndex,
|
||||
playlistReverse: this.playlistReverse,
|
||||
|
|
|
@ -303,6 +303,7 @@ export default Vue.extend({
|
|||
watchProgress: this.getTimestamp(),
|
||||
playbackRate: this.defaultPlayback,
|
||||
videoId: this.id,
|
||||
videoLength: this.lengthSeconds,
|
||||
playlistId: this.playlistId,
|
||||
playlistIndex: this.getPlaylistIndex(),
|
||||
playlistReverse: this.getPlaylistReverse(),
|
||||
|
|
|
@ -895,7 +895,7 @@ const actions = {
|
|||
args.push(...defaultCustomArguments)
|
||||
}
|
||||
|
||||
if (payload.watchProgress > 0) {
|
||||
if (payload.watchProgress > 0 && payload.watchProgress < payload.videoLength - 10) {
|
||||
if (typeof cmdArgs.startOffset === 'string') {
|
||||
args.push(`${cmdArgs.startOffset}${payload.watchProgress}`)
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue