定制 joe1992w/laravel-media-embed 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

joe1992w/laravel-media-embed

Composer 安装命令:

composer require joe1992w/laravel-media-embed

包简介

Laravel Wrapper for dereuromark/MediaEmbed to generate embed HTML for popular media hosts

README 文档

README

A simple wrapper for dereuromark/MediaEmbed to generate embed HTML for popular media hosting services.

Installation

composer require joe1992w/laravel-media-embed

OR

"require": {
    "joe1992w/laravel-media-embed": "^1.0",
},
composer install

Service Provider

'providers' => [
    // Others...
    Joe1992w\LaravelMediaEmbed\Providers\LaravelMediaEmbedServiceProvider::class,
],

Facade

'aliases' => [
    // Others...
    'LaravelMediaEmbed' => Joe1992w\LaravelMediaEmbed\Facades\LaravelMediaEmbed::class,
],

Usage

//URL to be used for embed generation
$url = "https://www.youtube.com/watch?v=8eK-5ivYb3o";

//Optional array of website names, if present any websites not in the array will result in false being returned by the parser
$whitelist = ['YouTube', 'Vimeo'];

//Optional parameters to be appended to embed
$params = [
    'autoplay' => 1,
    'loop' => 1
  ];

//Optional attributes for embed container
$attributes = [
  'type' => null,
  'class' => 'iframe-class',
  'data-html5-parameter' => true
];

return LaravelMediaEmbed::parse($url, $whitelist);
// "<iframe src="https://www.youtube.com/embed/8eK-5ivYb3o?wmode=transparent" type="text/html" width="480" height="295" frameborder="0" allowfullscreen></iframe>"

return LaravelMediaEmbed::parse($url);
// "<iframe src="https://www.youtube.com/embed/8eK-5ivYb3o?wmode=transparent" type="text/html" width="480" height="295" frameborder="0" allowfullscreen></iframe>"

return LaravelMediaEmbed::parse($url, ['Vimeo']);
// false

return LaravelMediaEmbed::parse($url, $whitelist, $params, $attributes)
//<iframe src="https://www.youtube.com/embed/8eK-5ivYb3o?wmode=transparent&amp;autoplay=1&amp;loop=1" type="" width="480" height="295" frameborder="0" allowfullscreen class="iframe-class" data-html5-parameter></iframe>

Supported Hosts

Please see dereuromark/MediaEmbed

Supported Website Whitelist names

Name
YouTube Facebook Dailymotion
MetaCafe Vimeo 123video
5min Life Videopedia AdultSwim
AniBoom AOL Video (Old) Aparat
Archive.org Atom Blastro
$2 BoFunk Break
Brightcove.com CBS News Cellfish
Clarin Clip.vn ClipFish (Old)
ClipFish (Special) ClipFish (New)
ClipJunkie ClipMoon ClipShack
CNetTV CollegeHumor TheDailyShow
ColbertNation Crackle CrunchyRoll
Current Dailyhaha Dave.tv
DotSub (w/o Captions) DoubleViking dropshots.com
Dv.ouou Divshare EASportsWorld
EbaumsWorld ESPN Fandome
Flickr Foxhead FunnyOrDie
FunMansion G4TV GameKyo
GameSpot GameTrailers (Inc. User Movies) Gametube.org
GameVideos.1up GarageTv Gloria
GoEar Good.IS Glumbert
GodTube GrindTv Guzer
TheHub Howcast Hulu (Usa Only)
Humour Video.i.ua IGN
iJigg IMDB ImageShack
IndyaRocks iReport Izlesene
§Jamendo Jokeroo JujuNation Video
JujuNation Audio JustinTV Kewego
Koreus Last.fm (Audio) Last.fm (Video)
Libero LiveLeak LiveVideo
MSNBC Video.mail.ru MadnessVideo
Metatube MotionBox Mpora
Mp3tube MtvU (Usa Only) MP3 Audio
MyNet MyShows.cn/SeeHaha.com MySpaceTv
MyVideo MyVi M Thai
NewGrounds NhacCuaTui OnSmash
Orb Photobucket PikNikTube
Project Playlist Putfile Rambler
RawVegas RuTube Screencast
ScreenToaster SevenLoad ShareView
Sharkle Smotri Snotr
SouthPark Studios Space.tv.cctv.com Spike
Songza Streetfire StupidVideos
TagTélé Ted.com The Onion
TinyPic Todays Big Thing TrailerAddict
TrTube Trilulilu Tu.tv
Tudou Tumblr (Music) Twitvid
UOL VideoLog u-Tube Ustream
VideoJug videos.sapo Vidiac
Viddler Videa VidiLife
VidMax Vidivodo VoiceThread
WeGame Webshots (Slideshows) Wistia
Yahoo Video HK Yahoo Video Yahoo Music Videos
YouKu sina video XVideos
Local Content

joe1992w/laravel-media-embed 适用场景与选型建议

joe1992w/laravel-media-embed 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.19k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2017 年 03 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「package development」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 joe1992w/laravel-media-embed 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 joe1992w/laravel-media-embed 我们能提供哪些服务?
定制开发 / 二次开发

基于 joe1992w/laravel-media-embed 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3.19k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-03-02