PATH:
home
/
letacommog
/
letaweb
/
admin
/
classes
/
socialEmbed
/
Embera
/
Providers
<?php /** * Bambuser.php. * * @author Michael Pratt <pratt@hablarmierda.net> * * @link http://www.michael-pratt.com/ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Embera\Providers; /** * The bambuser.com Provider. * * @link http://bambuser.com * @link http://bambuser.com/api/embed_oembed */ class Bambuser extends \Embera\Adapters\Service { /** inline {@inheritdoc} */ protected $apiUrl = 'http://api.bambuser.com/oembed.json'; /** inline {@inheritdoc} */ protected function validateUrl() { $this->url->stripLastSlash(); $this->url->stripWWW(); return ( preg_match('~bambuser\.com/v/(?:[0-9]+)$~i', $this->url) || preg_match('~bambuser\.com/channel/(?:[^/]+)$~i', $this->url) ); } /** inline {@inheritdoc} */ public function normalizeUrl() { if (preg_match('~bambuser\.com/channel/(?:[^/]+)/broadcast/([0-9]+)~i', $this->url, $matches)) { $this->url = new \Embera\Url('http://bambuser.com/v/'.$matches['1']); } } /** inline {@inheritdoc} */ public function fakeResponse() { $defaults = array( 'type' => 'video', 'provider_name' => 'Bambuser.com', 'provider_url' => 'http://bambuser.com', ); $html = '<object id="bplayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}">'; $html .= '<embed name="bplayer" src="http://static.bambuser.com/r/player.swf?{query}&context=oembed" type="application/x-shockwave-flash" width="{width}" height="{height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque"></embed>'; $html .= '<param name="movie" value="http://static.bambuser.com/r/player.swf?{query}&context=oembed"></param>'; $html .= '<param name="allowfullscreen" value="true"></param>'; $html .= '<param name="allowscriptaccess" value="always"></param><param name="wmode" value="opaque"></param>'; $html .= '</object>'; if (preg_match('~/v/([0-9]+)$~i', $this->url, $matches)) { return array_merge( $defaults, array('html' => str_replace('{query}', 'vid='.$matches['1'], $html)) ); } elseif (preg_match('~/channel/([^/]+)~i', $this->url, $matches)) { return array_merge( $defaults, array('html' => str_replace('{query}', 'username='.urlencode($matches['1']), $html)) ); } return array(); } }
[+]
..
[-] Chartblocks.php
[edit]
[-] CrowdRanking.php
[edit]
[-] VideoFork.php
[edit]
[-] Twitter.php
[edit]
[-] SoundCloud.php
[edit]
[-] YFrog.php
[edit]
[-] Clyp.php
[edit]
[-] DailyMotion.php
[edit]
[-] Vimeo.php
[edit]
[-] Gmep.php
[edit]
[-] PollDaddy.php
[edit]
[-] AmCharts.php
[edit]
[-] Youtube.php
[edit]
[-] Sapo.php
[edit]
[-] Flickr.php
[edit]
[-] Meetup.php
[edit]
[-] GithubGist.php
[edit]
[-] CollegeHumor.php
[edit]
[-] Rdio.php
[edit]
[-] Cacoo.php
[edit]
[-] GeographCI.php
[edit]
[-] Coub.php
[edit]
[-] BlipTV.php
[edit]
[-] VideoJug.php
[edit]
[-] Screenr.php
[edit]
[-] Edocr.php
[edit]
[-] Speakerdeck.php
[edit]
[-] Deviantart.php
[edit]
[-] Issuu.php
[edit]
[-] Spotify.php
[edit]
[-] Revision3.php
[edit]
[-] Animoto.php
[edit]
[-] Vine.php
[edit]
[-] Hq23.php
[edit]
[-] Bambuser.php
[edit]
[-] Ted.php
[edit]
[-] WordpressTV.php
[edit]
[-] Instagram.php
[edit]
[-] IFTTT.php
[edit]
[-] FunnyOrDie.php
[edit]
[-] GeographDe.php
[edit]
[-] Roomshare.php
[edit]
[-] Portfolium.php
[edit]
[-] Ustream.php
[edit]
[-] Huffduffer.php
[edit]
[-] MobyPicture.php
[edit]
[-] DailyMile.php
[edit]
[-] Shoudio.php
[edit]
[-] PollEveryWhere.php
[edit]
[-] OfficialFM.php
[edit]
[-] Chirbit.php
[edit]
[-] Dipity.php
[edit]
[-] Sketchfab.php
[edit]
[-] DotSub.php
[edit]
[-] IFixIt.php
[edit]
[-] NFB.php
[edit]
[-] GeographUk.php
[edit]
[-] Rapidengage.php
[edit]
[-] SlideShare.php
[edit]
[-] MixCloud.php
[edit]
[-] Kickstarter.php
[edit]
[-] Viddler.php
[edit]
[-] GettyImages.php
[edit]
[-] AudioSnaps.php
[edit]
[-] AppNet.php
[edit]
[-] Hulu.php
[edit]
[-] CircuitLab.php
[edit]
[-] AolOn.php
[edit]
[-] Scribd.php
[edit]