GithubHelp home page GithubHelp logo

angular-embedly's People

Contributors

ackushiw avatar diogoriba avatar moranf avatar odellcraig avatar omri avatar sethlesky avatar tomtomgo avatar urigo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

angular-embedly's Issues

embedlyService.extract has error

embedlyService.extract(url)

returns this error

 Error Object {data: "Cannot GET /function%20getProtocol()%20%7B%20%20%2…he-shopping-cart-patent-and-saved-online-retail/↵", status: 404, headers: function, config: Object, statusText: "Not Found"}config: Objectdata: "Cannot GET /function%20getProtocol()%20%7B%20%20%20%20%20%20%20%20%20%20%20%20return%20secure%20?%20%27https%27%20:%20%27https%27%20;%20%20%20%20%20%20%20%20}://api.embed.ly/1/extract?key=8d5fa3afe41a41d392b52af11adafbac&url=http://arstechnica.com/tech-policy/2013/01/how-newegg-crushed-the-shopping-cart-patent-and-saved-online-retail/↵"headers: function (name) {status: 404statusText: "Not Found"__proto__: Object

I can't be sure if a URL was successfully oEmbedded

Assuming oEmbed is a verb, I can never know if the URL to be oEmbedded is actually oEmbedded.

For example retrieving this URL (verify on Embed.ly) doesn't throw an error, but also doesn't return an embed code. The user of the page then doesn't see anything.

We could find this out by looking at the result of the oEmbed call and see that it doesn't contain a HTML entry:

description: "Nancy Duarte, CEO of Duarte, Inc., outlines best practices for preparing your next speech."
provider_name: "Hbr"
provider_url: "http://hbr.org"
thumbnail_height: 720
thumbnail_url: "http://brightcove.vo.llnwd.net/e1/pd/2071817190001/2071817190001_2228601438001_stillImage-1-49cu0ygy-2235560989001.jpg?pubId=2071817190001"
thumbnail_width: 1280
title: "Connect with Any Audience"
type: "link"
url: "http://hbr.org/video/2228473586001/connect-with-any-audience"
version: "1.0"

Suggestion

My suggestion would be to add an attribute to the directive that passes a function to be called in this situation. That might look something like this:

<em-embed urlsearch="{{url}}" onerror="saySorryToUser()"></em-embed>

So, I can build it, with proper commit messages and all. If you have any comments let me know!

Main property required by Brunch

I use Brunch (brunch.io)[brunch.io] for building. It requires the .bower.json to have a main property, like this:

error: [Error: Component JSON file "/home/tom/project/bower_components/angular-embedly/.bower.json" must have main property. See https://github.com/paulmillr/read-components#README]

It can be easily fixed by adding "main": "angular-embedly.js" to the bower.json file.

Add support for `rich` media

According to [http://embed.ly/docs/api/embed/endpoints/1/oembed#the-rich-type](the docs) rich media type is very similar to the video type.

I would like to add the possibility of embedding the rich media type.

Create a more detailed documentation

I am new to AngularJs development, and it really helps when there's a more detailed documentation (e.g.: explaining how to use the service to extract information).

Embedding doesn't work on local deployments

Embed.ly's API returns an HTML element containing an iframe, which has the source set to //cdn.embedly.com/widgets/media.html. This works fine if you're using angular-embedly over HTTP(S), but not if you're using it on file://.

This is the case when you're e.g. using Cordova to build a mobile app.

I propose to add a line that checks for window.location.protocol == 'file:' and if so prepends http: to the iframe source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.