Skip to content

Commit

Permalink
Merge pull request #8 from tv2norge-collab/upstream/vmix-automation-a…
Browse files Browse the repository at this point in the history
…nd-fixes

vMix features, bug fixes, mixer automation mode, group faders, ui updates
  • Loading branch information
olzzon authored Dec 3, 2024
2 parents 94ea454 + 858d237 commit 550ddeb
Show file tree
Hide file tree
Showing 89 changed files with 4,346 additions and 2,602 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/publish-lib.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Publish prerelease

env:
node-version: 18
node-package-manager: yarn

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
prerelease:
name: Prerelease
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
packages: write
id-token: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Configure CodeArtifact Token
run: |
echo CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain selma --domain-owner ${{ secrets.AWS_ACCOUNT_ID }} --query authorizationToken --output text --region ${{ secrets.AWS_REGION }}) >> $GITHUB_ENV
- name: Check release is desired
id: do-publish
run: |
if [ -z "${{ secrets.AWS_ROLE_ARN }}" ]; then
echo "No Token"
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "Publish nightly"
echo "publish=nightly" >> $GITHUB_OUTPUT
else
echo "Publish experimental"
echo "publish=experimental" >> $GITHUB_OUTPUT
fi
- name: Prepare Environment
if: ${{ steps.do-publish.outputs.publish }}
run: |
yarn install
yarn build
env:
CI: true
- name: Bump version
if: ${{ steps.do-publish.outputs.publish }}
run: |
git config --global user.email "chandrashekar.nallamilli@tv2.no"
git config --global user.name "chandrashekar-nallamilli"
COMMIT_TIMESTAMP=$(git log -1 --pretty=format:%ct HEAD)
COMMIT_DATE=$(date -d @$COMMIT_TIMESTAMP +%Y%m%d-%H%M%S)
GIT_HASH=$(git rev-parse --short HEAD)
PRERELEASE_TAG=nightly-$(echo "${{ github.ref_name }}" | sed -r 's/[^a-z0-9]+/-/gi')
cd component-lib
yarn version --prerelease --preid "$PRERELEASE_TAG-$COMMIT_DATE-$GIT_HASH"
env:
CI: true
- name: Publish to Code Artifatct
if: ${{ steps.do-publish.outputs.publish }}
run: |
aws codeartifact login --tool npm --repository selma-store --domain selma --domain-owner ${{ secrets.AWS_ACCOUNT_ID }} --region ${{ secrets.AWS_REGION }}
NEW_VERSION=$(node -p "require('./component-lib/package.json').version")
yarn config set version-git-tag false
yarn config set version-tag-prefix ""
yarn publish component-lib --new-version "$NEW_VERSION" --tag "$NEW_VERSION"
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "**Published:** $NEW_VERSION" >> $GITHUB_STEP_SUMMARY
env:
CI: true
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"semi": false,
"singleQuote": true
"singleQuote": true,
"trailingComma": "es5"
}
6 changes: 6 additions & 0 deletions .vscode/settings.json.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"prettier.enable": true,
"sonarlint.connectedMode.project": { "projectKey": "nrkno_sofie-core" },
"eslint.validate": ["typescript", "yaml"],
"editor.formatOnSave": false
}
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Skaarhoj in RAW panel mode is supported for rotary buttons including labels.

The monitor sends are the same as those on the Channel Strip.

## Automation Support:
## Automation Support via API:

It´s possible to control Sisyfos from an automationsystem, for it to act as middleware.

Expand Down Expand Up @@ -271,6 +271,10 @@ Pass a command directly from Automation to Audiomixer

/ch/{value1}/visible - integer { 0 or 1 }

#### Load mixer preset:

/loadmixerpreset - string {name of the preset}

## Get state:

#### Get full state of all channels:
Expand Down Expand Up @@ -328,3 +332,16 @@ _In response to a ping, sisyfos will reply with /pong and the provided value OR
Localization can be found in: /client/i18n.ts

If we end up with a huge amount of translations we move the translations to seperate files, but for now we keep it simple.


## Automation support from via Audio Mixer:

The ability to use use a character prefix (default is #) on the connected Audio Mixer to define whether a channel is in AUTO or MANUAL mode.
If the prefix is not found, the channel is in AUTO mode.
This is a 2-way communication, so if the user toggles the AUTO/MANUAL in the UI, the corresponding channel on the Audio Mixer will have the prefix added or removed.
Labels on the UI will allways hide the prefix.

### Pgm On follows Audio Mixer:
The default behaviour of Sisyfos is to have a target level. This is the level that the fader will fade to when the PGM button is pressed.
But when either in manual or in auto mode, it's possible to let the fader behave in sync with the audio mixer.
Settings the "PGM On follows Audio Mixer" in the settings, let's the sisyfos fader always follow level of the audio mixer, and when the level is zero, the PGM button turns off. If level is above zero, the PGM button will behave as a fadeout button.
6 changes: 6 additions & 0 deletions client/@types/svg.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module '*.svg' {
import * as React from 'react';

const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement> & { title?: string }>;
export default ReactComponent;
}
49 changes: 4 additions & 45 deletions client/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
import React from 'react'
import ReactDom from 'react-dom'
import App from './src/components/App'
import { socketClientHandlers } from './src/utils/SocketClientHandlers'
import io from 'socket.io-client'

//Redux:
import storeRedux from '../shared/src/reducers/store'
import { Provider as ReduxProvider } from 'react-redux'
import {
SOCKET_GET_SNAPSHOT_LIST,
SOCKET_GET_CCG_LIST,
SOCKET_GET_MIXER_PRESET_LIST,
SOCKET_GET_PAGES_LIST,
} from '../shared/src/constants/SOCKET_IO_DISPATCHERS'

import { I18nextProvider } from 'react-i18next'
import i18n from './src/utils/i18n'
import { MixerProtocol } from '../shared/src/constants/MixerProtocolInterface'

import ContextProvider from './src/components/ContextProvider'
declare global {
interface Window {
storeRedux: any
Expand All @@ -36,36 +22,9 @@ declare global {
// *** Uncomment to log Socket I/O:
// localStorage.debug = 'socket.io-client:socket';

window.storeRedux = storeRedux

//Subscribe to redux store:
window.reduxState = window.storeRedux.getState()
const unsubscribe = window.storeRedux.subscribe(() => {
window.reduxState = window.storeRedux.getState()
})

const { pathname } = window.location
const socketServerPath =
pathname + (pathname.endsWith('/') ? '' : '/') + 'socket.io/'
window.socketIoClient = io({
path: socketServerPath,
})
window.socketIoClient.emit(SOCKET_GET_SNAPSHOT_LIST)
window.socketIoClient.emit(SOCKET_GET_CCG_LIST)
window.socketIoClient.emit(SOCKET_GET_MIXER_PRESET_LIST)
window.socketIoClient.emit(SOCKET_GET_PAGES_LIST)

console.log('Setting up SocketIO connection')
socketClientHandlers()
window.socketIoClient.emit('get-store', 'update local store')
window.socketIoClient.emit('get-settings', 'update local settings')
window.socketIoClient.emit('get-mixerprotocol', 'get selected mixerprotocol')

ReactDom.render(
<ReduxProvider store={storeRedux}>
<I18nextProvider i18n={i18n}>
<App />
</I18nextProvider>
</ReduxProvider>,
<ContextProvider>
<App />
</ContextProvider>,
document.getElementById('root')
)
27 changes: 16 additions & 11 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,39 @@
"test": "echo \"Everything is fine\"",
"test:watch": "echo \"Everything is fine and not watching\""
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@types/node": "^18.16.0",
"@types/react-dom": "^18.2.18",
"@types/react-test-renderer": "^18.0.7",
"dependencies": {
"@floating-ui/react": "^0.26.20",
"classnames": "^2.5.1",
"css-loader": "^6.9.1",
"html-webpack-plugin": "^5.6.3",
"i18next": "^20.6.1",
"i18next-browser-languagedetector": "^7.2.0",
"lodash": "^4.17.21",
"nouislider": "^15.7.1",
"nouislider-react": "^3.4.2",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-draggable": "^4.4.6",
"react-i18next": "^12.2.2",
"react-redux": "^9.1.2",
"react-select": "^5.8.3",
"react-slider": "^2.0.6",
"react-test-renderer": "^18.2.0",
"reactjs-popup": "^2.0.6",
"redux": "^5.0.1",
"socket.io-client": "^4.7.4",
"webmidi": "^2.5.1"
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
"@types/lodash": "^4.17.7",
"@babel/core": "^7.23.9",
"@types/node": "^18.16.0",
"@types/react-dom": "^18.2.18",
"@types/react-test-renderer": "^18.0.7",
"classnames": "^2.5.1",
"css-loader": "^6.9.1",
"html-webpack-plugin": "^5.6.3",
"react-test-renderer": "^18.2.0",
"style-loader": "^3.3.4",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"webmidi": "^2.5.1",
"webpack": "^5.90.0",
"webpack-cli": "^5.1.4"
}
Expand Down
Loading

0 comments on commit 550ddeb

Please sign in to comment.