Skip to content

Commit

Permalink
Merge branch 'main' into f/editor-lock
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/redux/videoSlice.ts
#	src/util/utilityFunctions.ts
  • Loading branch information
JamesUoM committed Oct 4, 2023
2 parents 936fca0 + fb79f61 commit 92edc5f
Show file tree
Hide file tree
Showing 63 changed files with 10,003 additions and 23,643 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ module.exports = {

// A few of those are used.
"@typescript-eslint/no-non-null-assertion": "off",

// Until we figure out how to get to React 18
"react/no-deprecated": "off",
},
overrides: [
{
Expand Down
85 changes: 48 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,46 @@ To make the editor work in a sub-path, use:
Configuration
-------------

The editor can be configured through the `editor-settings.toml` settings file. It can either be provided in the public folder when running locally or can be found under `etc/opencast/ui-config/mh_default_org/editor` when deployed in Opencast. More information can be found in the example configuration file.

### Configuration Methods

Most configuration options can be set either as an option in the configuration file or as a URL parameter.

The configuration file is called `editor-settings.toml`. It can either be provided in the public folder when running locally or can be found under `etc/opencast/ui-config/mh_default_org/editor` when deployed in Opencast. More information can be found in the example configuration file.

If a configuration option belongs to a section, URL parameters are a combination of section and option separated by a single dot.

For example, the following option in the configuration file:

```toml
[trackSelection]
show = true
```

…can be specified as URL parameter in the form `trackSelection.show=true`.

If an option can be specified both ways, the URL parameter will always take precedence.


### Settings

Options which are usually specified in the configuration file are documented in there as well. Metadata configuration options are only documented in the configuration file.

| Option | URL | File | Description |
|-------------------------|-----|------|----------------------------------------------------------------------|
| id ||| Id of the event that the editor should open by default. |
| mediaPackageId ||| Deprecated. Use `id` instead. |
| allowedCallbackPrefixes ||| Allowed callback prefixes in callback url. |
| callbackUrl ||| Callback url to go back after finish. |
| callbackSystem ||| Callback system name to go back to. |
| opencast.url ||| URL of the opencast server to connect to. |
| opencast.name ||| Opencast user to use. For demo purposes only. |
| opencast.password ||| Password to use for authentication. For demo purposes only. |
| metadata.show ||| Show metadata tab. |
| trackSelection.show ||| Show track selection tab. |
| thumbnail.show ||| Show thumbnail tab. Demo only. |
| debug ||| Enable internationalization debugging. |
| lng ||| Select a specific language. Use language codes like `de` or `en-US`. |

How to cut a release for Opencast
---------------------------------
Expand All @@ -66,6 +104,7 @@ How to cut a release for Opencast
if necessary
- Verify that the new release runs in Opencast, then create the pull request.


Opencast API used by the Editor
-------------

Expand All @@ -82,40 +121,12 @@ Translating the Editor
You can help translating the editor to your language on [crowdin.com/project/opencast-editor](https://crowdin.com/project/opencast-editor). Simply request to join the project on Crowdin and start translating. If you are interested in translating a language which is not a target language right now, please create [a GitHub issue](https://github.com/opencast/opencast-editor/issues) and we will add the language.


Configuration
-------------

### Configuration Methods

Most configuration options can be set either as a URL parameter or as an option in the configuration file.

If the option belongs to a section, URL parameters are a combination of section and option separated by a single dot.

For example, the following option in the configuration file:

```toml
[trackSelection]
show = true
```

…can be specified as URL parameter in the form `trackSelection.show=true`.

If an option can be specified both ways, the URL parameter will always take precedence.


### Settings

Options which are usually specified in the configuration file are documented in there as well. Metadata configuration options are only documented in the configuration file.
Notes on Waveform Generation
----------------------------

| Option | URL | File | Description
| --------------------|-----|------|------------
| id | ✓ | ✓ | Id of the event that the editor should open by default.
| mediaPackageId | ✓ | ✓ | Deprecated. Use `id` instead.
| opencast.url | ✗ | ✓ | URL of the opencast server to connect to.
| opencast.name | ✗ | ✓ | Opencast user to use. For demo purposes only.
| opencast.password | ✗ | ✓ | Password to use for authentication. For demo purposes only.
| metadata.show | ✓ | ✓ | Show metadata tab.
| trackSelection.show | ✓ | ✓ | Show track selection tab.
| thumbnail.show | ✓ | ✓ | Show thumbnail tab. Demo only.
| debug | ✓ | ✗ | Enable internationalization debugging.
| lng | ✓ | ✗ | Select a specific language. Use language codes like `de` or `en-US`.
The editor displays a waveform image on the timeline in the cutting view. This waveform image is generated at runtime
from one of the videos of the event. However, to properly generate the image, the video it is generated from needs to be
loaded completely once, which takes time and bandwidth. If this poses a problem for your use case, you can instead have
Opencast provide an image in the internal publication. Provided images will always take precedence and prevent the
generation algorithm form running. The provided image should have the same flavor that is specified in the Opencast
configuration file `etc/org.opencastproject.editor.EditorServiceImpl.cfg`.
40 changes: 33 additions & 7 deletions editor-settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@
# ⚠️ When deployed, this file is publicly accessibly!


####
# General Settings
##

# Allowed prefixes in callback urls to prevent malicious urls
# If empty, no callback url is allowed
# Type: string[]
# Default: []
#allowedCallbackPrefixes = []

# Url to go back after finishing editing
# If undefined, no return link will be shown on the end pages
# Type: string | undefined
# Default: undefined
#callbackUrl =

# Name of system to go back to
# If undefined, a generic system name is used instead of a speficic name
# Type: string | undefined
# Default: undefined
#callbackSystem =


####
# Metadata
##
Expand Down Expand Up @@ -76,18 +99,21 @@
#mainFlavor = "captions"

[subtitles.languages]
## A list of languages for which subtitles can be created
"captions/source+de" = "Deutsch"
"captions/source+en" = "English"
"captions/source+es" = "Español"
## A list of languages for which new subtitles can be created
# For each language, various tags can be specified
# A list of officially recommended tags can be found at: TODO: link to opencast documentation for subtitle tags
# At least the "lang" tag MUST be specified
german = { lang = "de-DE" }
english = { lang = "en-US", type = "closed-caption" }
spanish = { lang = "es" }

[subtitles.icons]
# A list of icons to be displayed for languages defined above.
# Values are strings but should preferably be Unicode icons.
# These are optional and you can also choose to have no icons.
"captions/source+de" = "🇩🇪"
"captions/source+en" = "🇺🇸"
"captions/source+es" = "🇪🇸"
"de-DE" = "DE"
"en-US" = "EN"
"es" = "ES"

[subtitles.defaultVideoFlavor]
# Specify the default video in the subtitle video player by flavor
Expand Down
Loading

0 comments on commit 92edc5f

Please sign in to comment.