PHP code example of ayacoo / tiktok
1. Go to this page and download the library: Download ayacoo/tiktok 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 / tiktok example snippets
namespace Vendor\ExtName\EventListener;
use Ayacoo\Tiktok\Event\ModifyTiktokOutputEvent;
class TiktokOutputEventListener
{
public function __invoke(ModifyTiktokOutputEvent $event): void
{
$output = $event->getOutput();
$output = str_replace('src', 'data-src', $output);
$event->setOutput($output);
}
}