nterms / yii2-mediaelement-widget
MediaElement.js widget for Yii2
Installs: 168
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 1
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-12-21 17:22:34 UTC
README
MediaElement.js widget for Yii2
Usage
<?= \nterms\mediaelement\MediaElement::widget([ 'id' => 'video-id', 'sources' => [ ['src' => 'rtmp://stream.server.domain:1935/stream-name/mp4:video-file.mp4', 'type' => 'video/rtmp'], ['src' => 'http://stream.server.domain:1935/stream-name/mp4:video-file.mp4/playlist.m3u8', 'type' => 'application/x-mpegURL'], // Other source files goes here // ['type'=>"video/ogg", 'src'=>"myvideo.ogv"], // ['type'=>"video/webm", 'src'=>"myvideo.webm"], // ['type'=>"video/mp4", 'src'=>"myvideo.mp4"], ], 'tracks' => [ ['kind'=>"chapters", 'src'=>"chapters.srt", 'srclang'=>"en"], ['kind'=>"subtitles", 'src'=>"subtitles.srt", 'srclang'=>"en"] ], 'width' => 320, 'height' => 180, 'poster' => 'http://image.url/sample.png', ]); ?>