diff --git a/CHANGELOG.md b/CHANGELOG.md index 48aa149..371549c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,8 @@ ## v1.8.0 > v1.9.0 -- Add kick.com publication service - Add enlarged channel overview -- Add new publication services: Rumble, PicartoTV, NimoTV, Livepush +- Add new publication services: Dailymotion, Livepush, kick.com, NimoTV, PicartoTV, Rumble - Add frame interpolation (framerate) filter (thanks to orryverducci) - Add -referer option for pulling HTTP streams ([PR 40](https://github.com/datarhei/restreamer-ui/pull/40), thanks to mdastgheib) - Add a/v filter to the publication components ([#593](https://github.com/datarhei/restreamer-ui/issues/593)) diff --git a/src/utils/restreamer.js b/src/utils/restreamer.js index 85a39d4..71d31c3 100644 --- a/src/utils/restreamer.js +++ b/src/utils/restreamer.js @@ -1,7 +1,7 @@ import { i18n } from '@lingui/core'; import { t } from '@lingui/macro'; import { v4 as uuidv4 } from 'uuid'; -import * as jwt_decode from 'jwt-decode'; +import { jwtDecode } from "jwt-decode"; import Handlebars from 'handlebars/dist/cjs/handlebars'; import SemverSatisfies from 'semver/functions/satisfies'; import SemverGt from 'semver/functions/gt'; @@ -403,7 +403,7 @@ class Restreamer { } else { let claims = null; try { - claims = jwt_decode(token); + claims = jwtDecode(token); this._setTokenRefresh(claims.exi); this.api.SetToken(token); } catch (e) { diff --git a/src/views/Publication/Services/Dailymotion.js b/src/views/Publication/Services/Dailymotion.js new file mode 100644 index 0000000..b418236 --- /dev/null +++ b/src/views/Publication/Services/Dailymotion.js @@ -0,0 +1,115 @@ +import React from 'react'; + +import { Trans } from '@lingui/macro'; +import Grid from '@mui/material/Grid'; +import Link from '@mui/material/Link'; +import TextField from '@mui/material/TextField'; + +import Logo from './logos/dailymotion.svg'; + +const id = 'dailymotion'; +const name = 'Dailymotion'; +const version = '1.0'; +const stream_key_link = ''; +const description = ( + + Transmit your Livestream to an Dailymotion RTMP service.{' '} + + Here{' '} + + you can find more details about the settings. + +); +const image_copyright = Please get in touch with the operator of the service and check what happens.; +const author = { + creator: { + name: 'datarhei', + link: 'https://github.com/datarhei', + }, + maintainer: { + name: 'datarhei', + link: 'https://github.com/datarhei', + }, +}; +const category = 'platform'; +const requires = { + protocols: ['rtmp', 'rtmps'], + formats: ['flv'], + codecs: { + audio: ['aac'], + video: ['h264'], + }, +}; + +function ServiceIcon(props) { + return Dailymotion Logo; +} + +function init(settings) { + const initSettings = { + server_url: '', + stream_key: '', + ...settings, + }; + + return initSettings; +} + +function Service(props) { + const settings = init(props.settings); + + const handleChange = (what) => (event) => { + const value = event.target.value; + + settings[what] = value; + + const output = createOutput(settings); + + props.onChange([output], settings); + }; + + const createOutput = (settings) => { + const output = { + address: settings.server_url, + options: ['-rtmp_playpath', settings.stream_key, '-f', 'flv'], + }; + + return output; + }; + + return ( + + + Stream URL} + value={settings.server_url} + onChange={handleChange('server_url')} + error={settings.server_url.includes('rtmp://') || settings.server_url.includes('rtmps://') ? false : true} + helperText={settings.server_url.includes('rtmp://') || settings.server_url.includes('rtmps://') ? false : 'Please enter a valid RTMP/S URL.'} + /> + + + Stream key} + value={settings.stream_key} + onChange={handleChange('stream_key')} + /> + + + ); +} + +Service.defaultProps = { + settings: {}, + skills: {}, + metadata: {}, + streams: [], + onChange: function (output, settings) {}, +}; + +export { id, name, version, stream_key_link, description, image_copyright, author, category, requires, ServiceIcon as icon, Service as component }; diff --git a/src/views/Publication/Services/index.js b/src/views/Publication/Services/index.js index 767fd66..c5d7a00 100644 --- a/src/views/Publication/Services/index.js +++ b/src/views/Publication/Services/index.js @@ -4,6 +4,7 @@ import * as Brightcove from './Brightcove'; import * as CDN77 from './CDN77'; import * as Core from './Core'; import * as DaCast from './DaCast'; +import * as Dailymotion from './Dailymotion'; import * as DASH from './DASH'; import * as DLive from './DLive'; import * as Facebook from './Facebook'; @@ -94,6 +95,7 @@ registry.Register(Azure); registry.Register(Brightcove); registry.Register(Akamai); registry.Register(DaCast); +registry.Register(Dailymotion); registry.Register(Livepush); registry.Register(Rumble); registry.Register(CDN77); diff --git a/src/views/Publication/Services/logos/dailymotion.svg b/src/views/Publication/Services/logos/dailymotion.svg new file mode 100644 index 0000000..2b8ca11 --- /dev/null +++ b/src/views/Publication/Services/logos/dailymotion.svg @@ -0,0 +1,3 @@ + + +