Skip to content

Feature: watermark settings #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: next
Choose a base branch
from
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
5 changes: 3 additions & 2 deletions studio-frontend/.envTemplate
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ VUE_APP_THEME=linTO-green
VUE_APP_LOGO=linto-studio-logo-no-text.svg
VUE_APP_NAME=linTO Studio
VUE_APP_DEFAULT_METADATA=room,team
VUE_APP_WATERMARK_FREQUENCY=60 # in seconds
VUE_APP_ENABLE_WATERMARK=false
VUE_APP_WATERMARK_FREQUENCY=600 # in seconds
VUE_APP_WATERMARK_DURATION=10 # in seconds

VUE_APP_WATERMARK_CONTENT="Transcription by LinTO.ai $linto Open Source AI by $linagora"
VUE_APP_ENABLE_SESSION=false
VUE_APP_EXPERIMENTAL_HIGHLIGHT=false
VUE_APP_EXPERIMENTAL_DARK_THEME=true
Expand Down
3 changes: 3 additions & 0 deletions studio-frontend/public/img/pin-angle-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions studio-frontend/public/img/pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion studio-frontend/src/components/FormCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>

<div
class="flex row"
class="flex row align-center"
v-if="field.label"
:title="p_disabled ? p_disabledReason : ''">
<label class="form-label" :for="id">
Expand Down
7 changes: 6 additions & 1 deletion studio-frontend/src/components/MetadataList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Tag
:key="index"
v-for="(pairs, index) in field.value"
v-if="!isPrivateMetadata(pairs[0])"
:value="pairs[1]"
:categoryName="pairs[0]" />

Expand All @@ -25,7 +26,11 @@ export default {
return {}
},
mounted() {},
methods: {},
methods: {
isPrivateMetadata(key) {
return key.startsWith("@")
},
},
components: {
Tag,
},
Expand Down
74 changes: 74 additions & 0 deletions studio-frontend/src/components/ModalWatermarkSettings.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<template>
<ModalNew
@on-cancel="($event) => this.$emit('on-cancel')"
@on-confirm="applyWatermarkSettings"
:title="$t('session.live_page.watermark_settings.title')"
:actionBtnLabel="$t('session.live_page.watermark_settings.apply_button')"
small>
<div class="modal-watermark-settings">
<FormInput
inputFullWidth
:field="watermarkContentField"
v-model="watermarkContentField.value" />
<FormInput
inputFullWidth
:field="watermarkFrequencyField"
v-model="watermarkFrequencyField.value" />
<FormInput
inputFullWidth
:field="watermarkDurationField"
v-model="watermarkDurationField.value" />
</div>
</ModalNew>
</template>
<script>
import { bus } from "@/main.js"
import ModalNew from "./ModalNew.vue"
import EMPTY_FIELD from "@/const/emptyField"
import FormInput from "@/components/FormInput.vue"

export default {
props: {
field: {
type: Object,
},
},
data() {
return {
watermarkContentField: {
...EMPTY_FIELD,
value: this.field.value.content,
label: this.$t("session.live_page.watermark_settings.text"),
type: "text",
},
watermarkFrequencyField: {
...EMPTY_FIELD,
value: this.field.value.frequency,
label: this.$t("session.live_page.watermark_settings.frequency"),
type: "number",
},
watermarkDurationField: {
...EMPTY_FIELD,
value: this.field.value.duration,
label: this.$t("session.live_page.watermark_settings.duration"),
type: "number",
},
}
},
mounted() {},
methods: {
applyWatermarkSettings() {
this.$emit("input", {
content: this.watermarkContentField.value,
frequency: Number(this.watermarkFrequencyField.value),
duration: Number(this.watermarkDurationField.value),
})
this.$emit("on-confirm")
},
},
components: {
ModalNew,
FormInput,
},
}
</script>
27 changes: 26 additions & 1 deletion studio-frontend/src/components/SessionChannel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@
:finalText="finalText"
:fontSize="fontSize"
:key="fontSize"
:selectedTranslations="selectedTranslations" />
:selectedTranslations="selectedTranslations"
:watermarkFrequency="watermarkFrequency"
:watermarkDuration="watermarkDuration"
:watermarkContent="watermarkContent"
:watermarkPinned="watermarkPinned"
:displayWatermark="displayWatermark" />
<SubtitleFullscreen
v-if="showSubtitlesFullscreen"
:partialText="partialText"
Expand Down Expand Up @@ -244,6 +249,26 @@ export default {
required: false,
default: false,
},
watermarkFrequency: {
type: Number,
required: true,
},
watermarkDuration: {
type: Number,
required: true,
},
watermarkContent: {
type: String,
required: true,
},
watermarkPinned: {
type: Boolean,
required: true,
},
displayWatermark: {
type: Boolean,
required: true,
},
},
data() {
return {
Expand Down
3 changes: 2 additions & 1 deletion studio-frontend/src/components/SessionHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
:session="session"
withText
class="flex1" />
<div class="flex1" v-else></div>

<slot name="right-button-desktop"></slot>
</div>
Expand Down Expand Up @@ -58,7 +59,7 @@ export default {
},
session: {
type: Object,
required: true,
required: false,
},
name: {
type: String,
Expand Down
6 changes: 6 additions & 0 deletions studio-frontend/src/components/SessionLiveContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
fromMicrophone
@toggleMicrophone="$emit('toggleMicrophone')"
@onSave="$emit('onSave')"
:watermarkFrequency="watermarkFrequency"
:watermarkDuration="watermarkDuration"
:watermarkContent="watermarkContent"
:watermarkPinned="watermarkPinned"
:displayWatermark="displayWatermark"
:isRecording="isRecording"></SessionChannel>
<Loading v-else></Loading>
</div>
Expand All @@ -29,6 +34,7 @@ import { Fragment } from "vue-fragment"
import { bus } from "../main.js"

import SessionWS from "@/models/SessionWS.js"
import { getEnv } from "@/tools/getEnv"

import { sessionModelMixin } from "@/mixins/sessionModel.js"
import { sessionChannelModelMixin } from "../mixins/sessionChannelModel.js"
Expand Down
3 changes: 2 additions & 1 deletion studio-frontend/src/components/SessionLiveMicrophone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
v-bind:displayLiveTranscription.sync="displayLiveTranscription"
v-bind:displaySubtitles.sync="displaySubtitles"
v-bind:fontSize.sync="fontSize"
v-bind:selectedChannel.sync="selectedChannel" />
v-bind:selectedChannel.sync="selectedChannel"
quickSession />
</template>
<template v-slot:breadcrumb-actions>
<slot name="breadcrumb-actions"></slot>
Expand Down
Loading