2017 © Pedro Peláez
 

library youtube

A helper for generating an audio player flash object's HTML

image

navarr/youtube

A helper for generating an audio player flash object's HTML

  • Monday, December 14, 2015
  • by navarr
  • Repository
  • 4 Watchers
  • 40 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 2 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

YouTube Audio Player Generation Library

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

YTAudio is a helper designed to help generate a "YouTube audio embeddable" - a version of the YouTube flash player that is small enough that only the audio controls show., (*2)

YTAudio does not extract the audio from YouTube videos, nor does it eliminate the overhead of processing YouTube videos when playing the files., (*3)

Most of the class allows daisy-chaining, since it is primarily controlled through setters and is intended as a helper class. Below are two examples of rendering a YTAudio object., (*4)

use Navarr\YouTube\AudioPlayer;

AudioPlayer::create('http://www.youtube.com/watch?v=dvgZkm1xWPE&ob=av2n')
    ->size(AudioPlayer::SIZE_LARGE)
    ->theme(AudioPlayer::THEME_DARK)
    ->hd() // Force HD
    ->loop() // Loop
    ->progressBar() // Show Progress Bar
    ->timeCode() // Show Time Code
    ->autoplay() // Autoplay
    ->render(); // Output XHTML

This method uses daisy-chaining for setting. Any daisy-chain function that turns a feature on or off takes a boolean, with the default value being true., (*5)

use Navarr\YouTube\AudioPlayer;

AudioPlayer::create(
    'http://www.youtube.com/watch?v=dvgZkm1xWPE&ob=av2n',
    [
        'size' => AudioPlayer::SIZE_LARGE,
        'theme' => AudioPlayer::THEME_DARK,
        'hd',
        'loop',
        'autoplay',
        'progressbar',
        'timecode',
    ]
)->render();

This method accepts the configuration as an array. You can daisy chain after it, but you probably will not need to., (*6)

The Versions

14/12 2015

dev-master

9999999-dev

A helper for generating an audio player flash object's HTML

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

youtube music audio player

14/12 2015

v2.0

2.0.0.0

A helper for generating an audio player flash object's HTML

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

youtube music audio player