Вопрос

I need to do some client-side oEmbedding for a project. I have been using jQuery-oEmbed, but I find that its overkill when the service providers I need most are really the big ones: YouTube, SoundCloud, Twitter, Wikipedia. Additionally, we recently added a strict HTTPS access policy to our websites, so we can't be querying APIs that don't support SSL.

I could manually edit que jQuery-oEmbed code to remove the websites I see fit, but I'm wondering if there is a better alternative - i.e. a terser oEmbed solution that supports the major APIs above and uses HTTPS only by default.

Это было полезно?

Решение 3

I ended up building ohembed for this purpose. It is lightweight, portable and supports SSL out of the box.

Другие советы

There's the fork jquery-oembed-all, located here:

https://github.com/starfishmod/jquery-oembed-all

It isn't necessarily any lighter of a library, and in fact may even have more options, but it's an alternative, at least, and perhaps worth some comparison. AFAIK, these are the only programmatic solutions to oEmbed ... but I, too, would be eager to hear if others know of any other libraries.

An alternative that I just dug up is http://www.mediaelementjs.com/

This JS can run standalone or with jQuery in order to wrap video and audio HTML5 elements including youtube and supplies suitable players for any device.

Another nice feature is that it provides skinning capabilities for the player, just as ytChromeless did (which is not able to run without flash, unfortunately.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top