Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: StreamerEvent -> websocket connection #2

Merged
merged 4 commits into from
Sep 22, 2021
Merged

add: StreamerEvent -> websocket connection #2

merged 4 commits into from
Sep 22, 2021

Conversation

alissonpeloso
Copy link

@alissonpeloso alissonpeloso commented Sep 14, 2021

Nesta issue, foi criado um evento chamado StreamerEvent. Esse evento enviará eventos via websocket para o live-streamer realizar funções como um controle remoto.

Para testar, é necessário rodar composer install para atualizar as dependencias.

Você deve settar o seu .env com o as seguintes informações:

PUSHER_APP_ID=1
PUSHER_APP_KEY=test
PUSHER_APP_SECRET=test
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
MIX_ECHO_WS_HOST=localhost

Também é necessário settar o BROADCAST_DRIVER com pusher, assim:

BROADCAST_DRIVER=pusher

também é necessário manter rodando em terminais os seguintes comandos:

  • php artisan websocket:serve
  • npm run watch

Então você pode iniciar um tinker: php artisan tinker e rodar um evento para verificar se está sendo enviado. Ex:
event(new \App\Events\StreamerEvent("{nome_do_evento}", "{parametros}"));

Se tudo der certo, você deve receber um evento na aba websockets:

image

Fix: #1

@alissonpeloso alissonpeloso reopened this Sep 16, 2021
@alissonpeloso alissonpeloso changed the title create: OBSEvent websocket connection add: StreamerEvent -> websocket connection Sep 16, 2021
@CleissonVieira CleissonVieira merged commit 33776c6 into dev Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gerar conexão websocket entre o live-web e live-streamer
4 participants