Wallogit.com
2017 © Pedro Peláez
Client for torrent player AceStream. This project is not maintainer and may be in not actual state., (*1)
"require": {
"sokil/php-acestream": "dev-master"
}
Incluging JS scripts can be done directry or through some asset manager. Direct inclusion:, (*3)
<script type="text/javascript" src="/js/core.js" /> <script type="text/javascript" src="/js/player.js" /> <script type="text/javascript" src="/js/ext.js" />
Call widget in your template:, (*4)
<?php echo new \Sokil\ACEPlayer\Player(array(
'debug' => true,
'media' => array(
'url' => 'http://example.com/film.torrent',
'name' => 'Film Title',
),
'height' => '200px',
); ?>
Add namespace 'vendor' somewhere in entry point file to register composer's vedror dir., (*5)
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
Yii::setPathOfAlias('vendor', APPLICATION_PATH . '/../vendor/');
Register static files in your controller, (*6)
Yii::import('vendor.sokil.php-acestream.src.Sokil.ACEPlayer.YiiPlayer');
YiiPlayer::registerStaticFiles();
Call widget in template, (*7)
<?php $this->widget('vendor.sokil.php-acestream.src.Sokil.ACEPlayer.YiiPlayer', array(
'debug' => true,
'media' => array(
'url' => 'http://example.com/film.torrent',
'name' => 'Film Title',
),
'height' => '200px',
)); ?>
| Parameter | Description |
|---|---|
| debug | Write debug data to console's log |
| media | This can be url or array {'url' => '', 'name' => ''}. Url may be in any format: unicast, multicast, torrent link or even number of media in playlist |
| height | Height of player. Width is always 100% |
| notInstalledPlayerMessage | Message that will be shown if AceStream Plugin not installed |