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!
Requires
- php: >=8.1
- jbroadway/urlify: ^1.0.0
Requires (Dev)
- fig-r/psr2r-sniffer: @stable
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.5 || ^11.5 || ^12.1 || ^13.0
- sebastian/diff: @stable
- dev-master
- 0.7.0
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.9
- 0.5.8
- 0.5.7
- 0.5.6
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- dev-next
- dev-bc-enhancements
- dev-architecture-improvements
- dev-architecture-modernization
- dev-remove-flash-providers
- dev-remove-dead-bittube
- dev-cleanup-orphan-providers
- dev-cleanup/remove-dead-code-and-refactor
- dev-remove-broken-flash-providers
- dev-add-medium-priority-providers
- dev-add-new-providers
- dev-fix-remaining-dead-providers
- dev-cleanup-dead-providers
This package is auto-updated.
Last update: 2026-03-27 06:25:07 UTC
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 30+ services, including the most important ones like
- YouTube
- Vimeo
- Dailymotion
- TikTok
- Twitch
etc. With community driven updates this aims to be a complete and up-to-date service wrapper lib.
All providers use modern iframe embeds (Flash support was removed as Flash was discontinued in 2020).
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.