Utils+Everywhere: Add a start offset tolerance for the external player (#2325)
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
f6abd74878
commit
b1183fe0c0
|
@ -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