@@ -111,6 +111,8 @@ export default defineComponent({
111
111
captions : [ ] ,
112
112
/** @type {'EQUIRECTANGULAR' | 'EQUIRECTANGULAR_THREED_TOP_BOTTOM' | 'MESH'| null } */
113
113
vrProjection : null ,
114
+ autoplayNextRecommendedVideo : false ,
115
+ autoplayNextPlaylistVideo : false ,
114
116
recommendedVideos : [ ] ,
115
117
downloadLinks : [ ] ,
116
118
watchingPlaylist : false ,
@@ -179,15 +181,15 @@ export default defineComponent({
179
181
return this . $store . getters . getDefaultVideoFormat
180
182
} ,
181
183
autoplayEnabled : function ( ) {
182
- return this . watchingPlaylist ? this . autoplayPlaylists : this . playNextVideo
184
+ return this . watchingPlaylist ? this . autoplayNextPlaylistVideo : this . autoplayNextRecommendedVideo
183
185
} ,
184
186
thumbnailPreference : function ( ) {
185
187
return this . $store . getters . getThumbnailPreference
186
188
} ,
187
- playNextVideo : function ( ) {
189
+ autoplayNextRecommendedVideoByDefault : function ( ) {
188
190
return this . $store . getters . getPlayNextVideo
189
191
} ,
190
- autoplayPlaylists : function ( ) {
192
+ autoplayNextPlaylistVideoByDefault : function ( ) {
191
193
return this . $store . getters . getAutoplayPlaylists
192
194
} ,
193
195
hideRecommendedVideos : function ( ) {
@@ -316,6 +318,9 @@ export default defineComponent({
316
318
created : function ( ) {
317
319
this . videoId = this . $route . params . id
318
320
this . activeFormat = this . defaultVideoFormat
321
+ // So that the value for this session remains unchanged even if setting changed
322
+ this . autoplayNextRecommendedVideo = this . autoplayNextRecommendedVideoByDefault
323
+ this . autoplayNextPlaylistVideo = this . autoplayNextPlaylistVideoByDefault
319
324
320
325
this . checkIfTimestamp ( )
321
326
this . currentPlaybackRate = this . $store . getters . getDefaultPlayback
@@ -1660,9 +1665,9 @@ export default defineComponent({
1660
1665
}
1661
1666
1662
1667
if ( this . watchingPlaylist ) {
1663
- this . updateAutoplayPlaylists ( ! this . autoplayEnabled )
1668
+ this . autoplayNextPlaylistVideo = ! this . autoplayEnabled
1664
1669
} else {
1665
- this . updatePlayNextVideo ( ! this . autoplayEnabled )
1670
+ this . autoplayNextRecommendedVideo = ! this . autoplayEnabled
1666
1671
}
1667
1672
} ,
1668
1673
@@ -1685,8 +1690,6 @@ export default defineComponent({
1685
1690
1686
1691
...mapActions ( [
1687
1692
'updateHistory' ,
1688
- 'updateAutoplayPlaylists' ,
1689
- 'updatePlayNextVideo' ,
1690
1693
'updateWatchProgress' ,
1691
1694
'updateLastViewedPlaylist' ,
1692
1695
'updatePlaylistLastPlayedAt' ,
0 commit comments