-
Notifications
You must be signed in to change notification settings - Fork 90
/
index.html
244 lines (224 loc) · 7.97 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<html>
<head>
<title>Noembed - oEmbed everything.</title>
<style type="text/css">
body {
font-family: Helvetica, Arial, sans-serif;
background: #fff;
color: #222;
background: #eefefe;
}
#container {
width: 520px;
margin: 30px auto;
}
code {
border: 1px solid #ddd;
padding: 0 2px;
color: #000;
background: #fff;
}
p {
line-height: 1.3em;
}
span.subhead {
font-weight: normal;
font-size: 0.8em;
}
li {
line-height: 1.3em;
}
h1, h2 {
color: #000;
}
h2 {
font-size: 1.4em;
margin: 1em 0;
}
h2 {
font-weight: normal;
}
h3 {
font-weight: bold;;
font-size: 1em;
}
p#footer {
font-size: 0.7em;
color: #999;
text-align: center;
margin-top: 30px;
border-top: 1px solid #eee;
padding-top: 15px;
}
pre {
width: 100%;
overflow: auto;
border: 1px solid #ddd;
padding: 4px;
color: #000;
background: #fff;
}
</style>
</head>
<body>
<div id="container">
<h1>Noembed <span title="DO IT!" class="subhead">— oEmbed everything.<span></h1>
<p>
<a href="http://www.oembed.com/">oEmbed</a> is nice. Unfortunately, not everything supports oEmbed. Worse,
the sites that <em>do</em> support it don't provide a consistent
interface. Noembed provides a single <a href="/embed">url</a> to get embeddable content
from a large list of sites, even sites without oEmbed support!
</p>
<p>
Additionally, Noembed guarantees that all responses will have
<code>html</code>, <code>title</code>, <code>url</code>, and
<code>provider_name</code> fields. This means fewer special
cases spent building up your own HTML.
</p>
<p>
A simple demo is <a href="demo">available here</a>.
<h2>Usage</h2>
<p>
Treat Noembed like a regular oEmbed provider, but use any of the <a href="#supported-sites">supported sites</a>
for the <code>url</code> parameter. Noembed also supports a <code>callback</code>
parameter for JSONP.
</p>
<p>
An example request might look like this:
</p>
<pre>http://noembed.com/embed?url=http%3A//www.youtube.com/watch%3Fv%3DbDOYN-6gdRE&callback=my_embed_function</pre>
<p>
And the response will look like:
</p>
<pre>
my_embed_function(
{
"width" : 425,
"author_name" : "schmoyoho",
"author_url" : "http://www.youtube.com/user/schmoyoho",
"version" : "1.0",
"provider_url" : "http://www.youtube.com/",
"provider_name" : "YouTube",
"thumbnail_width" : 480,
"thumbnail_url" : "http://i3.ytimg.com/vi/bDOYN-6gdRE/hqdefault.jpg",
"height" : 344,
"thumbnail_height" : 360,
"html" : "<iframe type='text/html' width='425' height='344' src='http://www.youtube.com/embed/bDOYN-6gdRE' frameborder=0></iframe>",
"url" : "http://www.youtube.com/watch?v=bDOYN-6gdRE",
"type" : "rich",
"title" : "Auto-Tune the News #8: dragons. geese. Michael Vick. (ft. T-Pain)"
}
)
</pre>
<p>
<em>Note:</em> <a href="http://code.google.com/p/chromium/issues/detail?id=81637">Chrome now blocks insecure scripts from loading on secure sites</a>.
So, when using Noembed with JSONP on an <code>https</code> site be sure to use <code>https://noembed.com/embed</code>.
</p>
<a name="supported-sites"></a>
<h2>Supported sites</h2>
<h3>Existing oEmbed</h3>
<ul>
<li>Viddler</li>
<li>Qik</li>
<li>Hulu</li>
</ul>
<h3>Improved oEmbed</h3>
<ul>
<li>Flickr - Photo links are put into an <code><img></code> tag.</li>
<li>Github gists - Includes the full gist instead of only the first 3 lines.</li>
<li>YouTube -
Uses an <code><iframe></code> so HTML5 video works. Preserves jump timecode (e.g. #t=5m30s).
</li>
<li>Vimeo - Sets <code><iframe></code> width to 640 instead of
native video width, which can get huge.</li>
</ul>
<h3>Other</h3>
<ul>
<li>Twitter</li>
<li>Wikipedia (including sub-sections)</li>
<li>Github commits</li>
<li>Giant Bomb</li>
<li>Twitpic</li>
<li>Urban Dictionary</li>
<li>Beer Advocate</li>
<li>Ascii Art Farts</li>
<li>Instagr.am</li>
<li>Github commits</li>
<li>Spotify</li>
<li>Imgur</li>
<li>Instagram</li>
<li>YFrog</li>
<li>CloudApp</li>
<li>Skitch</li>
<li>Ars Technica (comments)</li>
<li>IMDB</li>
<li>Amazon product pages</li>
<li>Path images</li>
<li>Bash.org quotes</li>
<li>XKCD</li>
<li>Trailer Addict</li>
<li>rapgenius</li>
<li>TED</li>
<li>Soundcloud</li>
<li>Picplz</li>
<li>Lockerz</li>
<li>Facebook posts</li>
</ul>
<h3>The <code>/providers</code> endpoint</h3>
<p>
Noembed provides <a href="https://noembed.com/providers">an endpoint</a> that returns the
current list of supported sites. The response is a
JSON list with the site name and URL patterns. This can be used to automate testing if a URL is
supported by Noembed without making an HTTP request.
</p>
<h2>Who is using Noembed?</h2>
<p><a href="mailto:lee@noembed.com">Let us know</a> if you're using noembed in your project!</p>
<ul>
<li><a href="http://arstechnica.com">Ars Technica</a></li>
<li><a href="http://www.usealice.org">Alice – web-based IRC client</a></li>
<li><a href="http://status.net">StatusNet – private social network</a></li>
<li><a href="http://www.metrotwit.com">MetroTwit – Windows Twitter client</a></li>
</ul>
<h2>Development</h2>
<p>
All the source code for Noembed is <a href="http://www.github.com/leedo/noembed">
on github</a>. Patches are accepted to add new services.
</p>
<p>
If you want to add new sites you'll probably want to have a look at these documents:
</p>
<ul>
<li><a href="docs/Noembed.html">Noembed</a></li>
<li><a href="docs/Source.html">Noembed::Source</a></li>
<li><a href="docs/ImageSource.html">Noembed::ImageSource</a></li>
<li><a href="docs/oEmbedSource.html">Noembed::oEmbedSource</a></li>
<li><a href="docs/Util.html">Noembed::Util</a></li>
<li><a href="docs/Request.html">Noembed::Request</a></li>
</ul>
<h2>Similar sites</h2>
<p>
<a href="http://oohembed.com/">Oohembed</a> is a very similar service. It even
acts as a gateway to non-oEmbed enabled sites. The main limitation that I encountered
was its lack of a guaranteed <code>html</code> field. Also, it is popular so it
regularly goes over its usage limits.
</p>
<p>
<a href="http://embed.ly/">embed.ly</a>. I have not tried this service, but it
lists support for hundreds of sites. Unfortunately, you can not add your own providers,
so you are limited to what they support.
</p>
<p id="footer">© 2011 Lee Aylward</p>
</div>
<a href="http://github.com/leedo/noembed"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/30f550e0d38ceb6ef5b81500c64d970b7fb0f028/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub"></a>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3895961-6']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>