PHP code example of fg / multiplayer

1. Go to this page and download the library: Download fg/multiplayer 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/ */

    

fg / multiplayer example snippets


$Multiplayer = new Multiplayer\Multiplayer();
$options = array(
	'autoPlay' => true,
	'foregroundColor' => 'BADA55'
);

echo $Multiplayer->html('http://www.dailymotion.com/video/xzn5qk', $options);
echo $Multiplayer->html('http://vimeo.com/47457051', $options);
echo $Multiplayer->html('http://www.youtube.com/watch?v=3qSMS4c5WAk', $options);

echo $Multiplayer->html($url, $options, function($playerUrl) {
    return '<iframe src="' . $playerUrl . '" class="video-player">'
});

new Multiplayer\Multiplayer($services, function($playerUrl) {
    return '<iframe src="' . $playerUrl . '" class="video-player">'
});