Skip to content

Yii2 wrapper for Plyr, a simple, accessible and customizable HTML5, YouTube and Vimeo media player.

License

Notifications You must be signed in to change notification settings

mattheobjornson/yii2-plyr-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-plyr-widget

Usage

Insert audio

<?php
echo \mattheobjornson\plyr\PlyrWidget::widget([
    'options' => [
        'type' => 'audio',
        'preload' => 'none',
    ],
    'tags' => [
        'source' => [
            ['src' => 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3', 'type' => 'audio/mp3']
        ],
    ]
]);
?>

Insert video

<?php
echo \mattheobjornson\plyr\PlyrWidget::widget([
    'options' => [
        'type' => 'video',
        'preload' => 'none',
    ],
    'tags' => [
        'source' => [
            ['src' => 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4', 'type' => 'video/mp4'],
            ['src' => 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.webm', 'type' => 'video/webm']
        ],
    ]
]);
?>

About

Yii2 wrapper for Plyr, a simple, accessible and customizable HTML5, YouTube and Vimeo media player.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages