All Projects → mpratt → Embera

mpratt / Embera

Licence: mit
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.

Projects that are alternatives of or similar to Embera

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 (-72.39%)
Mutual labels:  vimeo, youtube, twitter, facebook, instagram
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 (-61.19%)
Mutual labels:  vimeo, youtube, twitter, facebook, instagram
Bash2mp4
Video Downloader for Termux .
Stars: ✭ 68 (-74.63%)
Mutual labels:  youtube, twitter, facebook, instagram
Keyring
Keyring is an authentication framework for WordPress. It comes with definitions for a variety of HTTP Basic, OAuth1 and OAuth2 web services. Use it as a common foundation for working with other web services from within WordPress code.
Stars: ✭ 52 (-80.6%)
Mutual labels:  youtube, twitter, facebook, instagram
Feeds
Importiert Daten aus API-Quellen wie Facebook, Instagram, Twitter, YouTube, Vimeo oder RSS (ehemals YFeed)
Stars: ✭ 34 (-87.31%)
Mutual labels:  youtube, twitter, facebook, instagram
Skraper
Kotlin/Java library and cli tool for scraping posts and media from various sources with neither authorization nor full page rendering (Facebook, Instagram, Twitter, Youtube, Tiktok, Telegram, Twitch, Reddit, 9GAG, Pinterest, Flickr, Tumblr, IFunny, VK, Pikabu)
Stars: ✭ 72 (-73.13%)
Mutual labels:  youtube, twitter, facebook, instagram
Rssbox
📰 I consume the world via RSS feeds, and this is my attempt to keep it that way.
Stars: ✭ 492 (+83.58%)
Mutual labels:  vimeo, youtube, twitter, instagram
Daily Coding Problem
Series of the problem 💯 and solution ✅ asked by Daily Coding problem👨‍🎓 website.
Stars: ✭ 90 (-66.42%)
Mutual labels:  youtube, twitter, facebook
alternative-front-ends
Overview of alternative open source front-ends for popular internet platforms (e.g. YouTube, Twitter, etc.)
Stars: ✭ 1,664 (+520.9%)
Mutual labels:  instagram, youtube, twitter
Reaper
Social media scraping / data collection tool for the Facebook, Twitter, Reddit, YouTube, Pinterest, and Tumblr APIs
Stars: ✭ 240 (-10.45%)
Mutual labels:  youtube, twitter, facebook
Privacy Redirect
A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.
Stars: ✭ 342 (+27.61%)
Mutual labels:  youtube, twitter, instagram
Streamwall
Display a mosaic of livestreams. Built for streaming.
Stars: ✭ 160 (-40.3%)
Mutual labels:  youtube, facebook, instagram
Gatsby Remark Embedder
Gatsby Remark plugin to embed well known services by their URL.
Stars: ✭ 245 (-8.58%)
Mutual labels:  youtube, twitter, instagram
Social Network Harvester V1.0
Stars: ✭ 5 (-98.13%)
Mutual labels:  youtube, twitter, facebook
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 (+2113.06%)
Mutual labels:  vimeo, youtube, facebook
Timeliner
In general, Timeliner obtains items from data sources and stores them in a timeline.
Stars: ✭ 2,911 (+986.19%)
Mutual labels:  twitter, facebook, instagram
Social Media Data Scripts
Stars: ✭ 188 (-29.85%)
Mutual labels:  youtube, twitter, facebook
Rsshub
🍰 Everything is RSSible
Stars: ✭ 18,111 (+6657.84%)
Mutual labels:  youtube, twitter, instagram
Socialreaper
Social media scraping / data collection library for Facebook, Twitter, Reddit, YouTube, Pinterest, and Tumblr APIs
Stars: ✭ 338 (+26.12%)
Mutual labels:  youtube, twitter, facebook
SharpGrabber
Download from YouTube, Vimeo, PornHub, HLS (M3U8 files) with .NET and JavaScript, Library and desktop app for downloading high quality media
Stars: ✭ 138 (-48.51%)
Mutual labels:  instagram, youtube, vimeo

Embera - PHP Oembed consumer library

Build Status Total Downloads Latest Stable Version

Support via PayPal

Embera is an Oembed consumer library written in PHP. It takes urls from a text and queries the matching service for information about the media and embeds the resulting html. It supports +150 sites, such as Youtube, Twitter, Livestream, Dailymotion, Instagram, Vimeo and many many more.

Installation

Install the latest stable version with:

$ composer require mpratt/embera:~2.0

Standalone Installation (without Composer)

Download the latest release or clone this repository and include the Àutoloader.php file inside the Embera/src directory.

require '....../Autoloader.php';

use Embera\Embera;

$embera = new Embera();

Requirements

  • PHP >= 7.0 (It should work on 5.6)
  • Curl or allow_url_fopen should be enabled

Basic Usage

The most common or basic example is this one:

use Embera\Embera;

$embera = new Embera();
echo $embera->autoEmbed('Hi! Have you seen this video? https://www.youtube.com/watch?v=J---aiyznGQ Its the best!');

The last example returns something like the following text:

Hi! Have you seen this video?
<iframe
  width="459"
  height="344"
  src="https://www.youtube.com/embed/J---aiyznGQ?feature=oembed"
  frameborder="0"
  allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
  allowfullscreen
></iframe>
Its the best!

You can also inspect urls for their oembed data:

use Embera\Embera;

$embera = new Embera();
print_r($embera->getUrlData([
    'https://vimeo.com/374131624',
    'https://www.flickr.com/photos/bees/8597283706/in/photostream',
]));

That will return something like this

Array
(
    [https://vimeo.com/374131624] => Array
        (
            [type] => video
            [version] => 1.0
            [provider_name] => Vimeo
            [provider_url] => https://vimeo.com/
            [title] => VACATION movie
            [author_name] => Andrey Kasay
            [author_url] => https://vimeo.com/andreykasay
            [is_plus] => 0
            [account_type] => basic
            [html] => <iframe src="......."></iframe>
            [width] => 426
            [height] => 240
            [duration] => 146
            [description] => Остросюжетное кино про жизнь
            [thumbnail_url] => https://i.vimeocdn.com/video/832478725_295x166.jpg
            [thumbnail_width] => 295
            [thumbnail_height] => 166
            [thumbnail_url_with_play_button] => https://i.vimeocdn.com/......Fcrawler_play.png
            [upload_date] => 2019-11-19 06:27:37
            [video_id] => 374131624
            [uri] => /videos/374131624
            [embera_using_fake_response] => 0
            [embera_provider_name] => Vimeo
        )
    [https://www.flickr.com/photos/bees/8597283706/in/photostream] => Array
        (
            [type] => photo
            [flickr_type] => photo
            [title] => Durumu
            [author_name] => ‮‭‬bees
            [author_url] => https://www.flickr.com/photos/bees/
            [width] => 1024
            [height] => 723
            [url] => https://live.staticflickr.com/8385/8597283706_7b51ea50b1_b.jpg
            [web_page] => https://www.flickr.com/photos/bees/8597283706/
            [thumbnail_url] => https://live.staticflickr.com/8385/8597283706_7b51ea50b1_q.jpg
            [thumbnail_width] => 150
            [thumbnail_height] => 150
            [web_page_short_url] => https://flic.kr/p/e6HjVq
            [license] => All Rights Reserved
            [license_id] => 0
            [html] => .........
            [version] => 1.0
            [cache_age] => 3600
            [provider_name] => Flickr
            [provider_url] => https://www.flickr.com/
            [embera_using_fake_response] => 0
            [embera_provider_name] => Flickr
            [html_alternative] => ........
        )
)

The response data depends on the provider, each of them returns information about the consulted media, however this library always tries to provide an embeddable html key that can be used to embed the information on a html document.

This library has fake responses / Offline support which is a way of getting the html embeddable code without the need of querying the oembed provider. It also has caching support, provider collections, responsive embeds and many other features. You can find out more by reading the documentation below.

Documentation

Migrating from version >= 1.9.x

The folder structure has changed, the library is now in the src folder and you can find an autoloader there if you are not using composer.

The configuration array has changed in order to make it simpler. Take a look at the Usage/Configuration instructions to update it.

The other major change is that the inspectUrlInfo() method is now called getUrlData(). The HtmlFormatter class does not exist anymore since the library allows now other type of templating.

Updating should be fairly easy, check the documentation.

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

Author

Michael Pratt - [email protected] - http://www.michael-pratt.com See also the list of contributors which participated in this project.

If you like this library, it has been useful to you and want to support me, you can do it via paypal.

Support via PayPal

License

Embera is licensed under the MIT License - see the LICENSE file for details

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].