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 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b6c0b9e
Split track selection to video and audio selection
Arnei Dec 14, 2023
01b3cdb
Merge remote-tracking branch 'upstream/main' into tracks-select-audio
Arnei Jan 18, 2024
a453936
Change frontend of track selection according to the mockups.
May 31, 2024
c097585
Add styles to enhance responsive design for small devices.
Jun 4, 2024
f4dc833
Transmit `customizedTrackSelection` to backend.
Jun 4, 2024
aa240ff
Fix case of `customized_track_selection`.
Jun 4, 2024
9c948d8
Merge branch 'main' into tracks-select-audio
Arnei Jun 4, 2024
4c255df
Fix build error
Arnei Jun 6, 2024
24124db
Fix variable name
Arnei Jun 6, 2024
3c1987f
New placeholder for no audio tracks
Arnei Jun 7, 2024
4506bde
Fix "No audio" tracks in track selection being selected
Arnei Jun 7, 2024
eb84d90
Align audio tracks and add descriptive text when missing the audio.
Jun 14, 2024
fa1e503
Import placeholder png as URL
Arnei Jun 19, 2024
48dcc3a
Merge remote-tracking branch 'upstream/main' into tracks-select-audio
Arnei Jun 21, 2024
682d862
Merge remote-tracking branch 'upstream/main' into tracks-select-audio
Arnei Jun 26, 2024
5314aee
Add config "atLeastOneVideo" to track selection
Arnei Jun 27, 2024
6700626
Add config "atMostTwoVideos" to track selection
Arnei Jun 27, 2024
a705bb9
Change track selection wording for audio tracks
Arnei Jun 27, 2024
18b11a3
Merge branch 'main' into tracks-select-audio
Arnei Dec 6, 2024
873a01f
Merge branch 'main' into tracks-select-audio
Arnei Dec 10, 2024
3ae8f0e
Fix BREAKPOINTS import
Arnei Dec 12, 2024
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 @@ -437,6 +437,11 @@ export const backgroundBoxStyle = (theme: Theme) => css(({
gap: "25px",
}));

export const checkboxStyle = (theme: Theme) => css({
color: theme.text,
"&.Mui-disabled": { color: theme.disabled },
});

export const undisplay = (maxWidth: number) => css({
[`@media (max-width: ${maxWidth}px)`]: {
display: "none",
Expand Down
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.
3 changes: 3 additions & 0 deletions src/main/Save.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { LuLoader, LuCheckCircle, LuAlertCircle, LuChevronLeft, LuSave, LuCheck

import { useAppDispatch, useAppSelector } from "../redux/store";
import {
selectCustomizedTrackSelection,
selectHasChanges,
selectSegments,
selectTracks,
Expand Down Expand Up @@ -116,6 +117,7 @@ export const SaveButton: React.FC<{

const segments = useAppSelector(selectSegments);
const tracks = useAppSelector(selectTracks);
const customizedTrackSelection = useAppSelector(selectCustomizedTrackSelection);
const subtitles = useAppSelector(selectSubtitles);
const metadata = useAppSelector(selectCatalogs);
const workflowStatus = useAppSelector(selectStatus);
Expand Down Expand Up @@ -162,6 +164,7 @@ export const SaveButton: React.FC<{
dispatch(postVideoInformation({
segments: segments,
tracks: tracks,
customizedTrackSelection,
subtitles: prepareSubtitles(),
metadata: metadata,
}));
Expand Down
Loading
Loading