Giter Site home page Giter Site logo

martin1982 / live-broadcast-demo Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 7.0 596 KB

Demo application for the live broadcast bundle.

License: MIT License

PHP 91.69% Shell 4.19% Twig 4.12%
demo symfony-bundle live-streaming facebook youtube twitch lively ustream rtmp

live-broadcast-demo's Introduction

Live Video Broadcast Demo

This project is a demo for the live video broadcast bundle. The same prerequisites as the bundle-project apply.

To install;

  • Clone this repository
  • Run composer install
  • Run the Doctrine schema update bin/console doctrine:schema:update --force
  • Run symfony server:start with certificates installed (as this is required by many channel providers) more info

The admin console will now be reachable at; http://localhost:8000/admin

Channels which require additional configuration are described below.

Enable Facebook live

Create a Facebook application at https://developers.facebook.com/ with the following permissions:

  • user_videos
  • user_events
  • user_managed_groups
  • manage_pages
  • publish_actions
  • Live-Video API

Edit the config/packages/live_broadcast.yaml with the following configuration:

live_broadcast:
    facebook:
        application_id: YourFacebookAppId
        application_secret: YourFacebookAppSecret

If you're using Sonata like this demo, add the Sonata block to login to Facebook;

sonata_block:
    blocks:
        sonata.block.service.facebookauth:
            contexts:   [admin]

Enable YouTube live streaming

Create a new 'YouTube Data API v3 Client' at https://console.developers.google.com

Edit the config/packages/live_broadcast.yaml with the following configuration:

live_broadcast:
    youtube:
        client_id: YourGoogleOauthClientId
        client_secret: YourGoogleOauthClientSecret
        redirect_route: admin_martin1982_livebroadcast_channel_abstractchannel_youtubeoauth

The route admin_martin1982_livebroadcast_channel_abstractchannel_youtubeoauth is provided out of the box to set the route for Sonata Admin.

If you're using Sonata like this demo, add the Sonata block to login to Google;

sonata_block:
    blocks:
        sonata.block.service.youtubeauth:
            contexts:   [admin]

live-broadcast-demo's People

Contributors

martin1982 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

live-broadcast-demo's Issues

Integrity constraint violation:

An exception occurred while executing 'INSERT INTO broadcasts_channels (broadcast_id, channel_id) VALUES (?, ?)' with params [2, 4]:

SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: broadcasts_channels.broadcast_id, broadcasts_channels.channel_id

while adding a new BS for youtube.

Running on Windows OS

Got error when create new Facebook channel

Hi there,

I just setup an demo based on your source code. With the following configurations:

config/packages/live_broadcast.yaml

parameters:
  broadcast_thumbnail_web_path: "uploads/thumbnails"

live_broadcast:
  facebook:
    application_id: '1772350940218'
    application_secret: 'abaofihg8lknsg028e2a187235fe1'

The Callback facebook login as
https://live-broadcast-bundle.example.com/admin/channel/create?subclass=Facebook
does it correct?

And when I try to create a facebook channel in the dashboard, it show an error:

 Unable to stream because the channel The default access token must be of type "string" or Facebook\AccessToken

and log when I start php server is:

[Fri Mar 20 23:43:55 2020] 172.17.0.1:62068 [500]: GET /admin/channel/facebook/accesstoken?userAccessToken=EAAChjdlpLUoBAOZBfPYH5EoniCUcEMc0ZClxLa80h9cwICPi8okOMLevOHiqpTOqqyLS6dlmAkJAJygHFGaauw8hQpNudZAbC3bIa1flksdGaspf9GAsPVwpDeLfPNZAsdasdAAUaKpVAysTdHGq4vwgXUOk3qBZAp8aZBCTkGwZC3vFIsQ2SyUVmczSyNx4TBW3IY68LYQZDZD

Can anyone can give me an advice on this case?

I pass the key to Graph Explorer and got these permissions:

  • user_events
  • email
  • publish_video
  • manage_pages
  • pages_show_list
  • publish_pages
  • public_profile

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.