Skip to content
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

Split track selection to video and audio selection #1230

Open
wants to merge 18 commits into
base: main
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
13 changes: 13 additions & 0 deletions editor-settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@
# Default: true
#show = true

# Ensure that at least one video stream remains selected
# Typically, the track selection ensures that at least one video stream
# remains selected. If you would like your users to be able to create selections
# with only audio streams, set this to false.
# Default: true
#atLeastOneVideo = true

# Disables track selection for events with more than two videos
# If your Opencast can handle track selection for more than two videos, set this
# to false.
# Default: true
#atMostTwoVideos = true

####
# Subtitles
##
Expand Down
2 changes: 2 additions & 0 deletions public/editor-settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ show = true

[trackSelection]
show = true
atLeastOneVideo = true
atMostTwoVideos = true

[subtitles]
show = true
Expand Down
6 changes: 6 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ interface iSettings {
},
trackSelection: {
show: boolean,
atLeastOneVideo: boolean,
atMostTwoVideos: boolean,
},
thumbnail: {
show: boolean,
Expand Down Expand Up @@ -93,6 +95,8 @@ const defaultSettings: iSettings = {
},
trackSelection: {
show: true,
atLeastOneVideo: true,
atMostTwoVideos: true,
},
thumbnail: {
show: false,
Expand Down Expand Up @@ -403,6 +407,8 @@ const SCHEMA = {
},
trackSelection: {
show: types.boolean,
atLeastOneVideo: types.boolean,
atMostTwoVideos: types.boolean,
},
subtitles: {
show: types.boolean,
Expand Down
5 changes: 5 additions & 0 deletions src/cssStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -433,3 +433,8 @@ export const backgroundBoxStyle = (theme: Theme) => css(({
padding: "20px",
gap: "25px",
}));

export const checkboxStyle = (theme: Theme) => css({
color: theme.text,
"&.Mui-disabled": { color: theme.disabled },
});
23 changes: 16 additions & 7 deletions src/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,22 @@

"trackSelection": {
"title": "Select track(s) for processing",
"trackInactive": "inactive",
"deleteTrackText": "Delete Track",
"restoreTrackText": "Restore Track",
"cannotDeleteTrackText": "Cannot Delete Track",
"deleteTrackTooltip": "Do not encode and publish this track.",
"restoreTrackTooltip": "Encode and publish this track.",
"cannotDeleteTrackTooltip": "Cannot remove this track from publication."
"help": "At least one track has to be selected.",
"helpAtLeastOneVideo": "At least one video track has to be selected.",
"atMostTwoVideos": "Track Selection is disabled for events with more than two videos",
"customizeLabel": "Customize track selection",
"videoTracksHeader": "Video tracks",
"audioTracksHeader": "Audio tracks",
"confirmText": "Confirm selection",
"confirmTooltip": "Confirm selected tracks",
"noAudioAvailable": "No audio available",
"selectionAlertInfoVideo_zero": "You have not selected any video track.",
"selectionAlertInfoVideo_one": "You have selected 1 video track.",
"selectionAlertInfoVideo_other": "You have selected {{count}} video tracks.",
"selectionAlertInfoAudio_zero": "You have not selected any audio track.",
"selectionAlertInfoAudio_one": "You have selected 1 audio track. It will be duplicated onto all videos.",
"selectionAlertInfoAudio_other": "You have selected {{count}} audio tracks.",
"selectionAlertError": "At least one video or audio track has to be selected."
},

"subtitles": {
Expand Down
Binary file added src/img/placeholder-waveform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/img/placeholder_waveform.png
Binary file not shown.
7 changes: 5 additions & 2 deletions src/main/Save.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { LuLoader, LuCheckCircle, LuAlertCircle, LuChevronLeft, LuSave, LuCheck
import { useAppDispatch, useAppSelector } from "../redux/store";
import { selectFinishState } from "../redux/finishSlice";
import {
selectCustomizedTrackSelection,
selectHasChanges,
selectSegments,
selectTracks,
Expand Down Expand Up @@ -117,6 +118,7 @@ export const SaveButton: React.FC = () => {

const segments = useAppSelector(selectSegments);
const tracks = useAppSelector(selectTracks);
const customizedTrackSelection = useAppSelector(selectCustomizedTrackSelection);
const subtitles = useAppSelector(selectSubtitles);
const workflowStatus = useAppSelector(selectStatus);
const metadataStatus = useAppSelector(selectPostStatus);
Expand Down Expand Up @@ -173,8 +175,9 @@ export const SaveButton: React.FC = () => {
if (metadataStatus === "success" && metadataSaveStarted) {
setMetadataSaveStarted(false);
dispatch(postVideoInformation({
segments: segments,
tracks: tracks,
segments,
tracks,
customizedTrackSelection,
subtitles: prepareSubtitles(),
}));

Expand Down
Loading
Loading