refactor: update livekit build config and fix style problem and add event log

pull/105/merge
moonrailgun 2 years ago
parent 7cb5cadab4
commit 7c02848214

@ -15,8 +15,8 @@ services:
- redis
labels:
- "traefik.enable=true"
- "traefik.http.routers.admin.rule=PathPrefix(`/livekit/webhook`)"
- "traefik.http.services.admin.loadbalancer.server.port=3000"
- "traefik.http.routers.livekit.rule=PathPrefix(`/livekit/webhook`)"
- "traefik.http.services.livekit.loadbalancer.server.port=3000"
networks:
- internal
command: cd server/dist/plugins/com.msgbyte.livekit/webhook && node index.js
command: node server/dist/plugins/com.msgbyte.livekit/webhook/index.js

@ -5,16 +5,18 @@ import styled from 'styled-components';
const Root = styled.div.attrs({
className: 'lk-button',
})`
position: absolute;
top: 0.25rem;
right: 2.25rem;
padding: 0.125rem;
font-size: 20px;
background-color: rgba(0, 0, 0, 0.5);
border-radius: calc(var(--lk-border-radius) / 2);
opacity: 0;
transition: opacity 0.2s ease-in-out;
transition-delay: 0.2s;
.lk-participant-tile & {
position: absolute;
top: 0.25rem;
right: 2.25rem;
padding: 0.125rem;
font-size: 20px;
background-color: rgba(0, 0, 0, 0.5);
border-radius: calc(var(--lk-border-radius) / 2);
opacity: 0;
transition: opacity 0.2s ease-in-out;
transition-delay: 0.2s;
}
.lk-participant-tile:hover & {
opacity: 1;

@ -29,6 +29,8 @@ app.post('/livekit/webhook', (req, res) => {
try {
const event = receiver.receive(req.body, req.get('Authorization'));
console.log(JSON.stringify(event));
callBrokerAction('plugin:com.msgbyte.livekit.webhook', event);
} finally {
res.json({ result: true });

Loading…
Cancel
Save