From 6aa541481390980f9c85d2e66514ba0e6ce77a35 Mon Sep 17 00:00:00 2001 From: LoveIsGrief Date: Tue, 24 Sep 2019 08:48:01 +0200 Subject: Autoplay next recommended video (#2137) * Start working on autoplay of next video * Ignore changes made by gitpod * Apply changes from PR#1370 * Correct the spelling of recommendations * Fix linting errors * Move boolean check to existing onEnded handler * Pick a random video until the recommendations are improved * Add simple tests for autoPlayNextVideo * Fix lint ...again --- .../my-account-video-settings.component.html | 5 +++++ .../my-account-video-settings/my-account-video-settings.component.ts | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'client/src/app/+my-account/my-account-settings') diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html index a11238925..06fd9833a 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html @@ -47,6 +47,11 @@ inputName="autoPlayVideo" formControlName="autoPlayVideo" i18n-labelText labelText="Automatically plays video" > + + diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts index 4fb828082..99eee23b8 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts @@ -36,6 +36,7 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI nsfwPolicy: null, webTorrentEnabled: null, autoPlayVideo: null, + autoPlayNextVideo: null, videoLanguages: null }) @@ -57,6 +58,7 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI nsfwPolicy: this.user.nsfwPolicy, webTorrentEnabled: this.user.webTorrentEnabled, autoPlayVideo: this.user.autoPlayVideo === true, + autoPlayNextVideo: this.user.autoPlayNextVideo, videoLanguages }) }) @@ -66,6 +68,7 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI const nsfwPolicy = this.form.value[ 'nsfwPolicy' ] const webTorrentEnabled = this.form.value['webTorrentEnabled'] const autoPlayVideo = this.form.value['autoPlayVideo'] + const autoPlayNextVideo = this.form.value['autoPlayNextVideo'] let videoLanguages: string[] = this.form.value['videoLanguages'] if (Array.isArray(videoLanguages)) { @@ -84,6 +87,7 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI nsfwPolicy, webTorrentEnabled, autoPlayVideo, + autoPlayNextVideo, videoLanguages } -- cgit v1.2.3