Skip to content

Commit

Permalink
Add reset button to hide a player logo (datarhei/restreamer#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstabenow committed Oct 19, 2022
1 parent b5967f2 commit 24b14a2
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
@@ -1,10 +1,14 @@
# Restreamer-UI

### v1.4.1 > v1.5.0

- Add reset button to hide a player logo (datarhei/restreamer#431)

### v1.4.0 > v1.4.1

- Fix videojs-overlay logo size (now responsive)
- Fix videojs-overlay logo size (datarhei/restreamer#431)
- Fix use of TLS for input from local RTMP server
- Fix Icecast publication service settings
- Fix Icecast publication service settings (datarhei/restreamer#429)
- Fix removes SRT bitstream on tee (OBS > RTMP > SRT is faulty)

### v1.3.0 > v1.4.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "restreamer-ui",
"version": "1.4.1",
"version": "1.5.0",
"bundle": "restreamer-v2.3.0",
"private": false,
"license": "Apache-2.0",
Expand Down
49 changes: 46 additions & 3 deletions src/views/Publication/Player.js
Expand Up @@ -238,6 +238,42 @@ export default function Edit(props) {
});
};

const handleLogoReset = (event) => {
// For the cleanup of the core, we need to check the following:
// 1. is the image on the core or external?
// 2. is the image used somewhere else?
// 3. OK via dialog

handleChange(
'image',
'logo'
)({
target: {
value: '',
},
});

handleChange(
'position',
'logo'
)({
target: {
value: 'top-left',
},
});

handleChange(
'link',
'logo'
)({
target: {
value: '',
},
});

setSaving(false);
};

const handleDone = async () => {
setSaving(true);

Expand Down Expand Up @@ -453,9 +489,16 @@ export default function Edit(props) {
</Button>
}
buttonsRight={
<Button variant="outlined" color="primary" onClick={handleDone}>
<Trans>Save</Trans>
</Button>
<React.Fragment>
<Button variant="outlined" color="primary" onClick={handleDone}>
<Trans>Save</Trans>
</Button>
{$settings.logo.image && $tab === 'logo' && (
<Button variant="outlined" color="secondary" onClick={handleLogoReset}>
<Trans>Reset logo</Trans>
</Button>
)}
</React.Fragment>
}
/>
</Paper>
Expand Down

0 comments on commit 24b14a2

Please sign in to comment.