diff --git a/src/views/Publication/Services/Wettercom.js b/src/views/Publication/Services/Wettercom.js new file mode 100644 index 0000000..b6fb70d --- /dev/null +++ b/src/views/Publication/Services/Wettercom.js @@ -0,0 +1,122 @@ +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 FormInlineButton from '../../../misc/FormInlineButton'; +import Logo from './logos/wettercom.png'; + +const id = 'wettercom'; +const name = 'wetter.com'; +const version = '1.0'; +const stream_key_link = 'https://www.wetter.com/hd-live-webcams/informationen/'; +const description = ( + + Transmit your Livestream to wetter.com. Contact the publisher {' '} + + here{' '} + + . + +); +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 = 'software'; +const requires = { + protocols: ['rtmp'], + formats: ['flv'], + codecs: { + audio: ['aac'], + video: ['h264'], + }, +}; + +function ServiceIcon(props) { + return wetter.com Logo; +} + +function init(settings) { + const initSettings = { + protocol: 'rtmp://', + server_url: 'wettercom-c1.livespotting.com/c61cba4f-68a3-488e-b2e4-ffb8e182794f', + stream_id: '', + 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.protocol + settings.server_url + '/' + settings.stream_id + '.stream/' + settings.stream_id + '_token:' + settings.stream_key, + options: ['-f', 'flv'], + }; + + return output; + }; + + return ( + + + Stream ID} + value={settings.stream_id} + onChange={handleChange('stream_id')} + /> + + + Stream key} + value={settings.stream_key} + onChange={handleChange('stream_key')} + /> + + + + GET + + + + ); +} + +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 c5d7a00..70405a6 100644 --- a/src/views/Publication/Services/index.js +++ b/src/views/Publication/Services/index.js @@ -36,6 +36,7 @@ import * as Twitter from './Twitter'; import * as UDP from './UDP'; import * as Vimeo from './Vimeo'; import * as WOWZA from './WOWZA'; +import * as Wettercom from './Wettercom'; import * as Youtube from './Youtube'; class Registry { @@ -91,6 +92,7 @@ registry.Register(NimoTv); registry.Register(PeerTube); registry.Register(MediaNetwork); registry.Register(Livespotting); +registry.Register(Wettercom); registry.Register(Azure); registry.Register(Brightcove); registry.Register(Akamai); diff --git a/src/views/Publication/Services/logos/wettercom.png b/src/views/Publication/Services/logos/wettercom.png new file mode 100644 index 0000000..7c61343 Binary files /dev/null and b/src/views/Publication/Services/logos/wettercom.png differ