https://github.com/inquid/yii2-howlerjs
Javascript audio library for the modern web. https://howlerjs.com *WIDGET FOR Yii*
https://github.com/inquid/yii2-howlerjs
Last synced: 4 months ago
JSON representation
Javascript audio library for the modern web. https://howlerjs.com *WIDGET FOR Yii*
- Host: GitHub
- URL: https://github.com/inquid/yii2-howlerjs
- Owner: inquid
- Created: 2018-10-19T16:15:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-21T05:07:13.000Z (over 6 years ago)
- Last Synced: 2024-12-29T14:37:09.690Z (5 months ago)
- Language: CSS
- Homepage: https://inquid.co/yii-extensions
- Size: 6.46 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
howler.js
=========
Javascript audio library for the modern web. https://howlerjs.com *WIDGET FOR Yii*Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist inquid/yii2-howler-js "dev-master"
```or add
```
"inquid/yii2-howler-js": "dev-master"
```to the require section of your `composer.json` file.
Usage
-----Once the extension is installed, simply use it in your code by :
Some Howler options are available like volume
```php
= \inquid\howlerjs\HowlerJsSimple::widget(['songs' => ["http://www.hochmuth.com/mp3/Vivaldi_Sonata_eminor_.mp3"]]); ?>
```
Or if you want to use the example full screen player (recommended to use with an empty layout view):
```php
= \inquid\howlerjs\HowlerJsPlayer::widget(['path' => Yii::getAlias('@web/music'),
'files' =>
[
['title' => 'Vivaldi Example', 'file' => 'Vivaldi_Sonata_eminor_.mp3', 'howl' => null]
]
]); ?>
```
If you want to use remote http files
```php
\inquid\howlerjs\HowlerJsPlayer::widget([
'remoteFiles' => true,
'files' =>
[['title' => $file->name, 'file' => 'https://storage.googleapis.com/enter-video.appspot.com/music/Vivaldi_Sonata_eminor_.mp3', 'howl' => null]]
]);
```