Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Controller/OtherController.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public function getUserConfig(): Http\Response
'high_res_cond_default' => SystemConfig::get('memories.viewer.high_res_cond_default'),
'livephoto_autoplay' => 'true' === $getAppConfig('livephotoAutoplay', 'false'),
'livephoto_loop' => 'true' === $getAppConfig('livephotoLoop', 'false'),
'video_loop' => 'true' === $getAppConfig('videoLoop', 'false'),
'sidebar_filepath' => 'true' === $getAppConfig('sidebarFilepath', false),

// folder settings
Expand Down
8 changes: 8 additions & 0 deletions src/components/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
{{ t('memories', 'Loop Live Photos') }}
</NcCheckboxRadioSwitch>

<NcCheckboxRadioSwitch :checked.sync="config.video_loop" @update:checked="updateVideoLoop" type="switch">
{{ t('memories', 'Loop Videos') }}
</NcCheckboxRadioSwitch>

<NcCheckboxRadioSwitch
:checked.sync="config.sidebar_filepath"
@update:checked="updateSidebarFilepath"
Expand Down Expand Up @@ -360,6 +364,10 @@ export default defineComponent({
await this.updateSetting('livephoto_loop', 'livephotoLoop');
},

async updateVideoLoop() {
await this.updateSetting('video_loop', 'videoLoop');
},

async updateSidebarFilepath() {
await this.updateSetting('sidebar_filepath', 'sidebarFilepath');
},
Expand Down
3 changes: 3 additions & 0 deletions src/components/viewer/PsVideo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ class VideoContentSetup {
// and this container is computed during construction
// https://github.com/sampotts/plyr/blob/20bf5a883306e9303b325e72c9102d76cc733c47/src/js/fullscreen.js#L30
},
loop: {
active: staticConfig.getSync('video_loop'),
},
};

// Add quality options
Expand Down
1 change: 1 addition & 0 deletions src/services/static-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class StaticConfig {
high_res_cond_default: 'zoom',
livephoto_autoplay: true,
livephoto_loop: false,
video_loop: false,
sidebar_filepath: false,
metadata_in_slideshow: false,

Expand Down
1 change: 1 addition & 0 deletions src/typings/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ declare module '@typings' {
high_res_cond_default: HighResCond;
livephoto_autoplay: boolean;
livephoto_loop: boolean;
video_loop: boolean;
sidebar_filepath: boolean;
metadata_in_slideshow: boolean;

Expand Down