PHP code example of ayacoo / twitch

1. Go to this page and download the library: Download ayacoo/twitch library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ayacoo / twitch example snippets




namespace Vendor\ExtName\EventListener;

use Ayacoo\Twitch\Event\ModifyTwitchOutputEvent;

class TwitchOutputEventListener
{
    public function __invoke(ModifyTwitchOutputEvent $event): void
    {
        $output = $event->getOutput();
        $output = str_replace('src', 'data-src', $output);
        $event->setOutput($output);
    }
}