Download the PHP package fomvasss/youtube without Composer
On this page you can find all versions of the php package fomvasss/youtube. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package youtube
Youtube
Package for generate IFrame with youtube-link
Install
For Laravel < 5.5 register the service provider and aliases in config/app.php:
Publish config:
Config
Edit file config/youtube.php
, set:
- 'rel' => 0, #show like videos after finish
- 'autoplay' => 0, #autoplay video after open page
- 'loop' => 0, #if 1 - repeat video
- 'controls' => 1, #show control button in player
- 'showinfo' => 1, #show info about video (title, time)
- 'width' => 640, #width video
- 'height' => 360, #height video
-
'frameborder' => 0, #border on player
- 'bootstrap-responsive-embed' => false, #add bootstrap container with class "embed-responsive"
- 'bootstrap-ratio' => '16by9', #set default ratio 1by1 | 4by3 | 16by9 | 21by9
Using
Using facades Youtube
Now example, you can use next:
You get next iframe:
You can set more parameters in array:
If are you not set some parameters, it well have default values (with config youtube.php):
Using blade directive in template@youtube()
Also you can set more parameters in array:
Using Bootstrap responsive container
If in config/youtube.php sett 'bootstrap-responsive-embed' => true,
or array parameters is set 'bootstrap-responsive-embed' => true
then we give next:
Then the parameters height
& weight
are not using (ignoring)
You also can use bootstrap-ratio
parameters. Available next value ratio: 1by1 | 4by3 | 16by9 | 21by9