2017 © Pedro Peláez
 

library media

Embedding media content from popular providers.

image

davodavodavo3/media

Embedding media content from popular providers.

  • Sunday, June 4, 2017
  • by davodavodavo3
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Media

Generate media html (YouTube, Vimeo, Kickstarter etc.) based on the url., (*1)

Original Package: https://github.com/KaneCohen/embed, (*2)

Installation

Add following require to your composer.json file:, (*3)

For Laravel 5*:, (*4)

    "davodavodavo3/media": "dev-master"
    // or
    "davodavodavo3/media": "5.4.*@dev",

Then run composer install or composer update to download it and autoload., (*5)

Or simple run:, (*6)

composer require "davodavodavo3/media":"5.4.*@dev"

Then in your config/app.php add, (*7)

'providers' => array(

    //...
    Scorpion\LaravelMedia\MediaServiceProvider::class,
    //...

)

In aliases:, (*8)

'aliases' => array(

    //...
    'Media' => Scorpion\LaravelMedia\Facades\Media::class,
    //...

)

Usage

$media = Media::make('http://youtu.be/uifYHNyH-jA')->parseUrl()
// Will return Media class if provider is found. Otherwie will return false - not found. No fancy errors for now.
if ($media) {
    // Set width of the media embed.
    $media->setAttribute(['width' => 600]);

    // Print html: '<iframe width="600" height="338" src="//www.youtube.com/embed/uifYHNyH-jA" frameborder="0" allowfullscreen></iframe>'.
    // Height will be set automatically based on provider width/height ratio.
    // Height could be set explicitly via setAttr() method.
    echo $media->getHtml();
}

The Versions

04/06 2017

5.4.x-dev

5.4.9999999.9999999-dev

Embedding media content from popular providers.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Scorpion

soundcloud youtube vimeo coub

03/06 2017

dev-master

9999999-dev

Embedding media content from popular providers.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Scorpion

soundcloud youtube vimeo coub