All Projects → ricardofiorani → oembed

ricardofiorani / oembed

Licence: MIT license
PHP OEmbed wrapper for well-known video platforms and services

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to oembed

php-video-url-parser
A Simple and efficient PHP Video URL Parser that provides you thumbnails and embed codes for various video streaming websites
Stars: ✭ 57 (+119.23%)
Mutual labels:  vimeo, thumbnails, embed, dailymotion, video-embed
React Player
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
Stars: ✭ 5,931 (+22711.54%)
Mutual labels:  vimeo, twitch, facebook, dailymotion
Vime
Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
Stars: ✭ 1,928 (+7315.38%)
Mutual labels:  vimeo, embed, dailymotion
Network Avatar Picker
A npm module that returns user's social network avatar. Supported providers: facebook, instagram, twitter, tumblr, vimeo, github, youtube and gmail
Stars: ✭ 74 (+184.62%)
Mutual labels:  vimeo, facebook
Lightgallery.js
Full featured JavaScript image & video gallery. No dependencies
Stars: ✭ 5,168 (+19776.92%)
Mutual labels:  vimeo, thumbnails
Superembed.js
Fluid width for YouTube, Vimeo, Vine, VideoPress, DailyMotion, and more embedded videos.
Stars: ✭ 615 (+2265.38%)
Mutual labels:  vimeo, twitch
Embera
A Oembed consumer library, that gives you information about urls. It helps you replace urls to youtube or vimeo for example, with their html embed code. It has advanced features like offline support, responsive embeds and caching support.
Stars: ✭ 268 (+930.77%)
Mutual labels:  vimeo, facebook
Alltube
Web GUI for youtube-dl
Stars: ✭ 1,925 (+7303.85%)
Mutual labels:  vimeo, dailymotion
Socialcounters
jQuery/PHP - Collection of Social Media APIs that display number of your social media fans. Facebook Likes, Twitter Followers, Instagram Followers, YouTube Subscribers, etc..
Stars: ✭ 104 (+300%)
Mutual labels:  vimeo, facebook
Jekyll Embed Video
Embed videos in Jekyll webpages without a plugin (Youtube, Vimeo, Twitch, Streamable, Mixer, Google Drive clips + more)
Stars: ✭ 135 (+419.23%)
Mutual labels:  vimeo, twitch
vlitejs
🦋 vLitejs is a fast and lightweight Javascript library for customizing video and audio player in Javascript with a minimalist theme (HTML5, Youtube, Vimeo, Dailymotion)
Stars: ✭ 162 (+523.08%)
Mutual labels:  vimeo, dailymotion
Rssbox
📰 I consume the world via RSS feeds, and this is my attempt to keep it that way.
Stars: ✭ 492 (+1792.31%)
Mutual labels:  vimeo, twitch
Pylivestream
Pure Python FFmpeg-based live video / audio streaming to YouTube, Facebook, Periscope, Twitch, and more
Stars: ✭ 442 (+1600%)
Mutual labels:  vimeo, twitch
Lightgallery
A customizable, modular, responsive, lightbox gallery plugin.
Stars: ✭ 4,829 (+18473.08%)
Mutual labels:  vimeo, thumbnails
chrome-extension-aspectratio219
🖥️ Fit the screen properly in fullscreen mode on monitor ultrawide with 21:9 aspect ratio (Netflix, Youtube, PrimeVideo, Crunchyroll)
Stars: ✭ 28 (+7.69%)
Mutual labels:  twitch, dailymotion
video-to-markdown
How to embed a video in markdown? Here the answer. Add videos to your markdown files easier.
Stars: ✭ 159 (+511.54%)
Mutual labels:  vimeo, dailymotion
safe-search
Sets the built-in adult content filter (most often: safe search) on Google, YouTube, Bing, Yahoo, DuckDuckGo, Startpage, Dogpile, Yandex, Vimeo, Reddit, Ecosia, Dailymotion, Qwant, and Patreon.
Stars: ✭ 16 (-38.46%)
Mutual labels:  vimeo, dailymotion
oembed
A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.
Stars: ✭ 34 (+30.77%)
Mutual labels:  vimeo, oembed
MementoEmbed
A service that provides archive-aware oEmbed-compatible embeddable surrogates (social cards, thumbnails, etc.) for archived web pages (mementos).
Stars: ✭ 13 (-50%)
Mutual labels:  thumbnails, embed
laravel-embed
Effortless responsive embeds for videos, slideshows and more.
Stars: ✭ 106 (+307.69%)
Mutual labels:  vimeo, embed

OEmbed

Build Status Minimum PHP Version License Total Downloads Coding Standards

OEmbed is a PHP library to assist you retrieving data from providers that supports OEmbed.
It was built to be a successor of ricardofiorani/php-video-url-parser.

Installation

Install the latest version with

$ composer require ricardofiorani/oembed

Requirements

  • PHP 7.4
  • A PSR-18 implementation
  • A PSR-17 implementation of RequestFactory and UriFactory

Basic Usage

<?php declare(strict_types=1);

use Your\PSR7Implementation\Uri;
use RicardoFiorani\OEmbed\OEmbed;

require __DIR__ . '/vendor/autoload.php';

$service = new OEmbed();

$uri = new Uri('https://www.dailymotion.com/video/x804zfb?playlist=x6ymns');

$result = $service->get(
    $uri,
    480,
    300,
    ['omitscript' => true]
);

echo (string)$result; //will render the HTML (in case of "video" or "rich") or URL (in case of "photo")

Services supported (and tested)

  • Dailymotion
  • Deviantart.com
  • Facebook*
  • Gfycat
  • Giphy
  • Instagram*
  • Kickstarter
  • Me.me
  • Reddit
  • Soundcloud
  • Spotify
  • Twitch
  • Twitter
  • Vimeo
  • Youtube

*Facebook and Instagram requires authentication
Please see https://developers.facebook.com/docs/instagram/oembed
Also please see the example at the bottom of this doc

Services supported but not tested

  • 23HQ
  • Abraia
  • Adways
  • Alpha App Net
  • Altru
  • amCharts Live Editor
  • Animatron
  • Animoto
  • Apester
  • ArcGIS StoryMaps
  • Archivos
  • Audioboom
  • AudioClip
  • Audiomack
  • AudioSnaps
  • Avocode
  • AxiomNinja
  • Backtracks
  • Beautiful.AI
  • Blackfire.io
  • Blogcast
  • Box Office Buz
  • BrioVR
  • Buttondown
  • Byzart Project
  • Cacoo
  • Carbon Health
  • CatBoat
  • Ceros
  • ChartBlocks
  • chirbit.com
  • CircuitLab
  • Clipland
  • Clyp
  • CoCo Corp
  • CodeHS
  • Codepen
  • Codepoints
  • CodeSandbox
  • CollegeHumor
  • Commaful
  • Coub
  • Crowd Ranking
  • Cyrano Systems
  • Daily Mile
  • Datawrapper
  • Deseret News
  • Didacte
  • Digiteka
  • Dipity
  • DocDroid
  • Dotsub
  • DTube
  • edocr
  • eduMedia
  • EgliseInfo
  • Embed Articles
  • Embedery
  • Embedly
  • Ethfiddle
  • Eyrie
  • Fader
  • Faithlife TV
  • Firework
  • FITE
  • Flat
  • Flickr
  • Flourish
  • Fontself
  • FOX SPORTS Australia
  • FrameBuzz
  • FunnyOrDie
  • Geograph Britain and Ireland
  • Geograph Channel Islands
  • Geograph Germany
  • Getty Images
  • Gifnote
  • GloriaTV
  • GT Channel
  • Gyazo
  • hearthis.at
  • hihaho
  • Homey
  • HuffDuffer
  • Hulu
  • iFixit
  • IFTTT
  • iHeartRadio
  • Indaco
  • Infogram
  • Infoveave
  • Injurymap
  • Inoreader
  • inphood
  • iSnare Articles
  • Issuu
  • ivlismusic
  • Jovian
  • KakaoTv
  • Kidoju
  • Kirim.Email
  • Kit
  • Kitchenbowl
  • Knacki
  • Knowledge Pad
  • LearningApps.org
  • Lille.Pod
  • Livestream
  • Ludus
  • MathEmbed
  • Matterport
  • MediaLab
  • Medienarchiv der Künste - Zürcher Hochschule der Künste
  • Mermaid Ink
  • Microlink
  • Microsoft Stream
  • MixCloud
  • Moby Picture
  • Modelo
  • MorphCast
  • Music Box Maniacs
  • myBeweeg
  • Namchey
  • nanoo.tv
  • Nasjonalbiblioteket
  • Natural Atlas
  • nfb.ca
  • Odds.com.au
  • Odesli (formerly Songlink)
  • Official FM
  • Omniscope
  • On Aol
  • Ora TV
  • Orbitvu
  • Oumy
  • Outplayed.tv
  • Overflow
  • OZ
  • Padlet
  • Pastery
  • PingVP
  • Pinpoll
  • Pixdor
  • Podbean
  • Polaris Share
  • Poll Daddy
  • Port
  • Portfolium
  • posiXion
  • Qualifio
  • Quiz.biz
  • Quizz.biz
  • RadioPublic
  • RapidEngage
  • ReleaseWire
  • Replit
  • RepubHub
  • ReverbNation
  • RiffReporter
  • Roomshare
  • RoosterTeeth
  • Rumble
  • Runkit
  • Sapo Videos
  • Screen9
  • Screencast.com
  • Screenr
  • ScribbleMaps
  • Scribd
  • SendtoNews
  • ShortNote
  • Shoudio
  • Show the Way, actionable location info
  • Simplecast
  • Sizzle
  • Sketchfab
  • SlideShare
  • SmashNotes
  • SmugMug
  • SocialExplorer
  • Soundsgood
  • SpeakerDeck
  • Spotful
  • Spreaker
  • Stanford Digital Repository
  • Streamable
  • StreamOneCloud
  • Sutori
  • Sway
  • TED
  • The New York Times
  • They Said So
  • TickCounter
  • TikTok
  • Toornament
  • Topy
  • Tuxx
  • tvcf
  • TypeCast
  • Typlog
  • Ubideo
  • University of Cambridge Map
  • UnivParis1.Pod
  • UOL
  • Ustream
  • uStudio, Inc.
  • Utposts
  • Uttles
  • VeeR VR
  • Verse
  • VEVO
  • VideoJug
  • Vidlit
  • Vidmizer
  • Vidyard
  • Viously
  • Viziosphere
  • Vizydrop
  • Vlipsy
  • VLIVE
  • Vlurb
  • VoxSnap
  • Wave.video
  • wecandeo
  • Wiredrive
  • Wistia, Inc.
  • wizer.me
  • Wokwi
  • Wootled
  • WordPress.com
  • Xpression
  • Yes, I Know IT!
  • YFrog
  • Zeplin
  • ZingSoft
  • ZnipeTV
  • Zoomable
  • Plus all not mentioned available on https://oembed.com/providers.json

Currently Supported PHP Versions

  • PHP 7.4 || PHP 8.0 || PHP 8.1

Facebook and Instagram requiring authentication

Yeah I know, it sucks having to create an FB app and generate a token.

Anyway, there is two ways (maybe more but I can only think of two now) of making this lib work with FB and IG.

Method 1

You make a custom HTTP client (implementing \Psr\Http\Client\ClientInterface) and instructs it to retrieve the token following Facebook guidelines.

Method 2

Easier way, you just send your Application ID and Secret as an extra parameter to the endpoint and that's it.

$service = new OEmbed();

$uri = new Uri('https://www.facebook.com/FacebookDeutschland/videos/2403439749688130/');

$result = $service->get(
    $uri,
    480,
    300,
    ['access_token' => `{$appId}|{$appSecret}`]
);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].