Skip to content

Commit

Permalink
Add kick.com + mod. twitch server list
Browse files Browse the repository at this point in the history
  • Loading branch information
jstabenow committed Nov 27, 2023
1 parent 6a24e68 commit 3c46888
Show file tree
Hide file tree
Showing 7 changed files with 205 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_restreamer-ui.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: 'Build restreamer-ui'

on:
workflow_dispatch:
push:
branches-ignore:
- '**'
#workflow_dispatch:
#push:
# branches-ignore:
# - '**'

jobs:
docker:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build_restreamer_dev.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: 'Build datarhei/restreamer-ui:dev'

on:
workflow_dispatch:
workflow_call:
push:
branches:
- dev
#workflow_dispatch:
#workflow_call:
#push:
# branches:
# - dev

jobs:
docker:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

## v1.8.0 > vx.x.x

- Add kick.com publication service
- Add enlarged channel overview
- Add new publication services: Rumble, PicartoTV, NimoTV, Livepush
- 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))
- Mod extends twitch's server list
- Mod uses placeholders for ingress setups ([#560](https://github.com/datarhei/restreamer-ui/issues/560))
- Mod updates npm
- Fix Owncast typo
Expand Down
122 changes: 122 additions & 0 deletions src/views/Publication/Services/Kick.js
Original file line number Diff line number Diff line change
@@ -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 Logo from './logos/kick.svg';
import FormInlineButton from '../../../misc/FormInlineButton';

const id = 'kick';
const name = 'Kick';
const version = '1.0';
const stream_key_link = 'https://kick.com/dashboard/settings/stream';
const description = (
<Trans>
Transmit your Livestream to an Kick.com RTMP service.{' '}
<Link color="secondary" target="_blank" href="https://help.kick.com/en/articles/7066931-how-to-stream-on-kick-com">
Here{' '}
</Link>
you can find more details about the settings.
</Trans>
);
const image_copyright = <Trans>Please get in touch with the operator of the service and check what happens.</Trans>;
const author = {
creator: {
name: 'datarhei',
link: 'https://github.com/datarhei',
},
maintainer: {
name: 'datarhei',
link: 'https://github.com/datarhei',
},
};
const category = 'platform';
const requires = {
protocols: ['rtmps'],
formats: ['flv'],
codecs: {
audio: ['aac', 'mp3'],
video: ['h264'],
},
};

function ServiceIcon(props) {
return <img src={Logo} alt="Kick.com Logo" {...props} />;
}

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 (
<Grid container spacing={2}>
<Grid item xs={12}>
<TextField
variant="outlined"
fullWidth
placeholder="rtmps://your-id.global-contribute.live-video.net"
label={<Trans>Server URL</Trans>}
value={settings.server_url}
onChange={handleChange('server_url')}
error={settings.server_url.includes('rtmps://') ? false : true}
helperText={settings.server_url.includes('rtmps://') ? false : 'Please enter a valid RTMPS URL.'}
/>
</Grid>
<Grid item xs={12} md={9}>
<TextField
variant="outlined"
fullWidth
placeholder="abc123"
label={<Trans>Stream key</Trans>}
value={settings.stream_key}
onChange={handleChange('stream_key')}
/>
</Grid>
<Grid item xs={12} md={3}>
<FormInlineButton target="blank" href={stream_key_link} component="a">
<Trans>GET</Trans>
</FormInlineButton>
</Grid>
</Grid>
);
}

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 };
88 changes: 55 additions & 33 deletions src/views/Publication/Services/Twitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import Select from '../../../misc/Select';

const id = 'twitch';
const name = 'Twitch';
const version = '1.0';
const stream_key_link = 'https://dashboard.twitch.tv/settings/stream';
const version = '1.1';
const stream_key_link = 'https://dashboard/settings/stream';
const description = <Trans>Live-Streaming to Twitch Live RTMP Service.</Trans>;
const image_copyright = <Trans>More about licenses here</Trans>;
const author = {
Expand Down Expand Up @@ -64,8 +64,13 @@ function Service(props) {
};

const createOutput = (settings) => {
let region_postfix = '.twitch.tv';
if (settings.region.includes('live-video.net')) {
region_postfix = '';
}

const output = {
address: 'rtmp://' + settings.region + '.twitch.tv/app/' + settings.key,
address: 'rtmp://' + settings.region + region_postfix + '/app/' + settings.key,
options: ['-f', 'flv'],
};

Expand All @@ -78,48 +83,65 @@ function Service(props) {
<Select label={<Trans>Region</Trans>} value={settings.region} onChange={handleChange('region')}>
<MenuItem value="live">Autodetect</MenuItem>
<MenuItem value="live-hkg">Asia - Hong Kong</MenuItem>
<MenuItem value="live-sel">Asia - Seoul, South Korea</MenuItem>
<MenuItem value="blr01.contribute.live-video.net">Asia - India, Bangalore</MenuItem>
<MenuItem value="maa01.contribute.live-video.net">Asia - India, Chennai</MenuItem>
<MenuItem value="hyd01.contribute.live-video.net">Asia - India, Hyderabad</MenuItem>
<MenuItem value="bom01.contribute.live-video.net">Asia - India, Mumbai</MenuItem>
<MenuItem value="del01.contribute.live-video.net">Asia - India, New Delhi</MenuItem>
<MenuItem value="jkt01.contribute.live-video.net">Asia - Indonesia, Cikarang Barat</MenuItem>
<MenuItem value="jkt02.contribute.live-video.net">Asia - Indonesia, Jakarta</MenuItem>
<MenuItem value="osa01.contribute.live-video.net">Asia - Japan, Osaka</MenuItem>
<MenuItem value="live-tyo">Asia - Japan, Tokyo</MenuItem>
<MenuItem value="mnl01.contribute.live-video.net">Asia - Philippines, Manila</MenuItem>
<MenuItem value="live-sin">Asia - Singapore</MenuItem>
<MenuItem value="live-tpe">Asia - Taipei, Taiwan</MenuItem>
<MenuItem value="live-tyo">Asia - Tokyo, Japan</MenuItem>
<MenuItem value="live-syd">Australia - Sydney</MenuItem>
<MenuItem value="live-ams">EU - Amsterdam, NL</MenuItem>
<MenuItem value="live-ber">EU - Berlin, DE</MenuItem>
<MenuItem value="live-cph">Europe - Copenhagen, DK</MenuItem>
<MenuItem value="live-fra">EU - Frankfurt, DE</MenuItem>
<MenuItem value="live-hel">EU - Helsinki, FI</MenuItem>
<MenuItem value="live-lis">EU - Lisbon, Portugal</MenuItem>
<MenuItem value="live-lhr">EU - London, UK</MenuItem>
<MenuItem value="live-mad">EU - Madrid, Spain</MenuItem>
<MenuItem value="live-mrs">EU - Marseille, FR</MenuItem>
<MenuItem value="live-mil">EU - Milan, Italy</MenuItem>
<MenuItem value="live-osl">EU - Norway, Oslo</MenuItem>
<MenuItem value="live-cdg">EU - Paris, FR</MenuItem>
<MenuItem value="live-prg">EU - Prague, CZ</MenuItem>
<MenuItem value="live-arn">EU - Stockholm, SE</MenuItem>
<MenuItem value="live-vie">EU - Vienna, Austria</MenuItem>
<MenuItem value="live-waw">EU - Warsaw, Poland</MenuItem>
<MenuItem value="live-qro">NA - Mexico City</MenuItem>
<MenuItem value="live-ymq">NA - Quebec, Canada</MenuItem>
<MenuItem value="live-yto">NA - Toronto, Canada</MenuItem>
<MenuItem value="live-eze">South America - Argentina</MenuItem>
<MenuItem value="live-scl">South America - Chile</MenuItem>
<MenuItem value="live-lim">South America - Lima, Peru</MenuItem>
<MenuItem value="live-mde">South America - Medellin, Colombia</MenuItem>
<MenuItem value="live-rio">South America - Rio de Janeiro, Brazil</MenuItem>
<MenuItem value="live-sao">South America - Sao Paulo, Brazil</MenuItem>
<MenuItem value="live-sel">Asia - South Korea, Seoul</MenuItem>
<MenuItem value="live-tpe">Asia - Taiwan, Taipei</MenuItem>
<MenuItem value="bkk02.contribute.live-video.net">Asia - Thailand, Bangkok</MenuItem>
<MenuItem value="live-vie">Europe - Austria, Vienna</MenuItem>
<MenuItem value="live-prg">Europe - Czech Republic, Prague</MenuItem>
<MenuItem value="live-cph">Europe - Denmark, Copenhagen</MenuItem>
<MenuItem value="live-hel">Europe - Finland, Helsinki</MenuItem>
<MenuItem value="live-mrs">Europe - France, Marseille</MenuItem>
<MenuItem value="live-cdg">Europe - France, Paris</MenuItem>
<MenuItem value="live-ber">Europe - Germany, Berlin</MenuItem>
<MenuItem value="dus01.contribute.live-video.net">Europe - Germany, Dusseldorf</MenuItem>
<MenuItem value="live-fra">Europe - Germany, Frankfurt</MenuItem>
<MenuItem value="muc01.contribute.live-video.net">Europe - Germany, Munich</MenuItem>
<MenuItem value="live-mil">Europe - Italy, Milan</MenuItem>
<MenuItem value="live-ams">Europe - Netherlands, Amsterdam</MenuItem>
<MenuItem value="live-osl">Europe - Norway, Oslo</MenuItem>
<MenuItem value="live-waw">Europe - Poland, Warsaw</MenuItem>
<MenuItem value="live-lis">Europe - Portugal, Lisbon</MenuItem>
<MenuItem value="live-mad">Europe - Spain, Madrid</MenuItem>
<MenuItem value="live-arn">Europe - Sweden, Stockholm</MenuItem>
<MenuItem value="live-lhr">Europe - UK, London</MenuItem>
<MenuItem value="live-ymq">NA - Canada, Quebec</MenuItem>
<MenuItem value="live-yto">NA - Canada, Toronto</MenuItem>
<MenuItem value="live-qro">NA - Mexico, Queretaro</MenuItem>
<MenuItem value="live-syd">Oceania - Australia, Sydney</MenuItem>
<MenuItem value="live-scl">South America - chile, Santiago</MenuItem>
<MenuItem value="for01.contribute.live-video.net">South America - Brazil, Fortaleza</MenuItem>
<MenuItem value="live-rio">South America - Brazil, Rio de Janeiro</MenuItem>
<MenuItem value="live-sao">South America - Brazil, Sao Paulo</MenuItem>
<MenuItem value="live-eze">South America - Buenos Aires, Argentina</MenuItem>
<MenuItem value="bog01.contribute.live-video.net">South America - Colombia, Bogota</MenuItem>
<MenuItem value="live-mde">South America - Colombia, Medellin</MenuItem>
<MenuItem value="live-lim">South America - Peru, Lima</MenuItem>
<MenuItem value="live-dfw">US Central - Dallas, TX</MenuItem>
<MenuItem value="live-den">US Central - Denver, CO</MenuItem>
<MenuItem value="dfw56.contribute.live-video.net">US Central - Garland, TX</MenuItem>
<MenuItem value="live-hou">US Central - Houston, TX</MenuItem>
<MenuItem value="live-slc">US Central - Salt Lake City, UT</MenuItem>
<MenuItem value="live-iad">US East - Ashburn, VA</MenuItem>
<MenuItem value="live-atl">US East - Atlanta, GA</MenuItem>
<MenuItem value="live-ord">US East - Chicago</MenuItem>
<MenuItem value="live-ord">US East - Chicago, IL</MenuItem>
<MenuItem value="mfe01.contribute.live-video.net">US East - McAllen, TX</MenuItem>
<MenuItem value="live-mia">US East - Miami, FL</MenuItem>
<MenuItem value="live-jfk">US East - New York, NY</MenuItem>
<MenuItem value="live-lax">US West - Los Angeles, CA</MenuItem>
<MenuItem value="live-phx">US West - Phoenix, AZ</MenuItem>
<MenuItem value="live-pdx">US West - Portland, Oregon</MenuItem>
<MenuItem value="slc.contribute.live-video.net">US West - Salt Lake City, UT</MenuItem>
<MenuItem value="live-sfo">US West - San Francisco, CA</MenuItem>
<MenuItem value="live-sjc">US West - San Jose, CA</MenuItem>
<MenuItem value="live-sea">US West - Seattle, WA</MenuItem>
Expand Down
3 changes: 2 additions & 1 deletion src/views/Publication/Services/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as HLS from './HLS';
import * as Icecast from './Icecast';
import * as Image2 from './Image2';
import * as Instagram from './Instagram';
import * as Kick from './Kick';
import * as Linkedin from './Linkedin';
import * as Livepush from './Livepush';
import * as Livespotting from './Livespotting';
Expand Down Expand Up @@ -76,6 +77,7 @@ registry.Register(Facebook);
registry.Register(Youtube);
registry.Register(Twitter);
registry.Register(Twitch);
registry.Register(Kick);
registry.Register(Instagram);
registry.Register(Vimeo);
registry.Register(Restream);
Expand Down Expand Up @@ -110,5 +112,4 @@ registry.Register(UDP);
registry.Register(MPEGTS);
registry.Register(Framebuffer);


export default registry;
15 changes: 15 additions & 0 deletions src/views/Publication/Services/logos/kick.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3c46888

Please sign in to comment.