dereuromark / media-embed
A PHP library to deal with all those media services around, parsing their URLs and embedding their audio/video content in websites.
Fund package maintenance!
dereuromark
Installs: 327 234
Dependents: 13
Suggesters: 0
Security: 0
Stars: 177
Watchers: 7
Forks: 43
Open Issues: 5
Requires
- php: >=7.4
- jbroadway/urlify: ^1.0.0
Requires (Dev)
- fig-r/psr2r-sniffer: dev-master
- phpunit/phpunit: ^9.5
- sebastian/diff: @stable
README
A utility library that generates HTML embed tags for audio or video located on a given URL. It also parses and validates given media URLs.
It currently works with 120+ services, including the most important ones like
- YouTube
- Dailymotion
- MyVideo
- Vimeo
- Ustream
etc. With community driven updates this aims to be a complete and up-to-date service wrapper lib.
It uses iframes if possible, and has a fallback on the embed object if necessary.
Demo
https://sandbox.dereuromark.de/sandbox/media-embed
Requirements
- jbroadway/urlify for slugging
Note
Please feel free to join in and help out to further improve or complete it. There are always some providers changing their URLs/API or some new ones which are not yet completed.
Installation
Run
composer require dereuromark/media-embed
This will get the latest tagged version for you.
Documentation
For detailed documentation see /docs.
Credits
Inspired by autoembed.com which already included most of the supported services and laid the foundation of this OOP approach here. There is also this.