https://github.com/martin1982/live-broadcast-sonata-admin-bundle
Sonata admin bundle for martin1982/live-broadcast-bundle
https://github.com/martin1982/live-broadcast-sonata-admin-bundle
Last synced: 4 days ago
JSON representation
Sonata admin bundle for martin1982/live-broadcast-bundle
- Host: GitHub
- URL: https://github.com/martin1982/live-broadcast-sonata-admin-bundle
- Owner: Martin1982
- License: mit
- Created: 2020-07-29T07:19:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-06T14:24:24.000Z (about 2 years ago)
- Last Synced: 2024-07-08T13:42:58.806Z (10 months ago)
- Language: PHP
- Size: 91.8 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Live Broadcast Sonata Admin Bundle
[](https://github.com/martin1982/live-broadcast-sonata-admin-bundle/workflows/Static%20analysis%20of%20live-broadcast-sonata-admin-bundle/badge.svg)
[](https://packagist.org/packages/martin1982/live-broadcast-sonata-admin-bundle)[](https://packagist.org/packages/martin1982/live-broadcast-sonata-admin-bundle)
[](https://packagist.org/packages/martin1982/live-broadcast-sonata-admin-bundle)## Table of contents
- [About](#about)
- [Prerequisites](#prerequisites)
- [Basic installation](#basic-installation)
- [Enabling Facebook Live](#enabling-facebook-live)
- [Enabling YouTube Live](#enabling-youtube-live)
- [Add new output platforms](#add-new-output-platforms)
- [Admin GUI support](#admin-gui-support)## About
The Live Broadcast Bundle will make it possible to plan live video streams to
various channels like Twitch, YouTube Live, Facebook Live (referred to as Output or Channels).As "Input" we support files, URLs or existing RTMP streams.
For more info you can view the latest recorded presentation below, check the demo project at https://github.com/Martin1982/live-broadcast-demo or read on;
[](http://www.youtube.com/watch?v=axutXblArhM "High quality live broadcasting with PHP by @Martin1982 at @PHPamersfoort")
## Prerequisites
The Broadcaster needs a few commands;
* `ffmpeg 3.x or higher`
On Linux:
* `ps`
* `kill`On Mac:
* `ps`
* `grep`
* `kill`On Windows:
* `tasklist`
* `taskkill`To test these prerequisites the Symfony command `livebroadcaster:test:shell` can be used after the installation described below.
## Basic installation
This bundle will be made available on Packagist. You can then install it using Composer:
```bash
$ composer require martin1982/live-broadcast-bundle
```Next, for Symfony \< 4 enable the bundle in the kernel:
``` php
/admin/channel/youtube/oauthprovider`Add the YouTube API info to your config.yml:
live_broadcast:
youtube:
client_id: YourGoogleOauthClientId
client_secret: YourGoogleOauthClientSecret
redirect_route: admin_martin1982_livebroadcast_channel_abstractchannel_youtubeoauth
Add these lines to your parameters.yml (used for generating a thumbnail URL)parameters:
router.request_context.host: broadcast.com
router.request_context.scheme: https
## Add new output platformsCreate a new Channel Entity in Entity/Channel that extends the AbstractChannel (e.g. ChannelNew)
Create a new StreamOutput service in Service/StreamOutput that implements the OutputInterface (e.g. OutputNew)
Configure the service with the output tag in Resources/config/services.yml
live.broadcast.output.new:
class: Martin1982\LiveBroadcastBundle\Service\StreamOutput\OutputNew
tags:
- { name: live.broadcast.output, platform: 'New' }To add support for Sonata admin; add a new form for the Channel in Admin/ChannelAdmin.php
``` php
protected function configureFormFields(FormMapper $formMapper)
{
if ($subject instanceof ChannelNew) {
$formMapper->add('...', 'text', array('label' => '...'));
}
}
```Next add the subclass for the channelAdmin in Resources/config/admin.yml for
sonata.admin.channel
calls:
- [setConfiguredSubclasses, [ { "Name": Martin1982\LiveBroadcastBundle\Entity\Channel\ChannelNew } ] ]# Admin GUI support
This package is created to support Sonata Admin for the Web GUI interface, there are other flavours available from
Packagist with no GUI (the base martin1982/live-broadcast-bundle package) and EasyAdmin (martin1982/live-broadcast-easyadmin-bundle).