Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#11556 closed enhancement (fixed)

Add support for embedding YouTu.be URLs

Reported by: viper007bond's profile Viper007Bond Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9
Component: Embeds Keywords: has-patch tested
Focuses: Cc:

Description

http://youtube-global.blogspot.com/2009/12/make-way-for-youtube-links.html

Allows you to embed them. Needs to be transformed internally as their oEmbed provider doesn't support them. Adds a new filter to do it.

Attachments (2)

11556.patch (1.3 KB) - added by Viper007Bond 14 years ago.
11556.2.patch (962 bytes) - added by Viper007Bond 14 years ago.
Whitelist youtu.be

Download all attachments as: .zip

Change History (13)

@Viper007Bond
14 years ago

#1 @hakre
14 years ago

  • Keywords needs-testing added

#2 @nacin
14 years ago

  • Keywords tested added; needs-testing removed

#3 follow-up: @westi
14 years ago

  • Keywords reporter-feedback added

Could we not just register youtu.be as another oembed provided and rely on the 302 following of the HTTP handlers.

That way we don't need any youtu.be specific code in here and if they change the url format of any of the providers in future and offer 302 redirects we would follow those too?

#4 in reply to: ↑ 3 @Viper007Bond
14 years ago

Replying to westi:

Could we not just register youtu.be as another oembed provided and rely on the 302 following of the HTTP handlers.

That way we don't need any youtu.be specific code in here and if they change the url format of any of the providers in future and offer 302 redirects we would follow those too?

No, because their oEmbed provider doesn't understand their shortened URLs.

Example short URL: http://youtu.be/nTDNLUzjkpg

Their provider returns a 401 for that URL: http://www.youtube.com/oembed?format=xml&url=http%3A%2F%2Fyoutu.be%2FnTDNLUzjkpg

Ideally their oEmbed provider should support their short URLs. I didn't think that'd be possible, however I recently saw one of the YouTube people post to the oEmbed mailing list, so I'll see if I can get them to support their short URLs so we can just map them directly to their oEmbed provider.

#5 @ryan
14 years ago

  • Component changed from General to oEmbed

#6 @nacin
14 years ago

  • Milestone 3.0 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

YouTube's oEmbed provider now understands shortened URLs.

#7 @Viper007Bond
14 years ago

Sweet. :)

#8 follow-up: @Viper007Bond
14 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Actually, we still need to add that format to the whitelist, we just don't need a remapping function.

#9 in reply to: ↑ 8 @nacin
14 years ago

Replying to Viper007Bond:

Actually, we still need to add that format to the whitelist, we just don't need a remapping function.

Oops, yep.

@Viper007Bond
14 years ago

Whitelist youtu.be

#10 @automattor
14 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [13203]) Add Youtu.be short URLs and Smugmug to the default oEmbed providers. Props Viper007Bond, fixes #11556, fixes #12157

#11 @DrewAPicture
10 years ago

  • Keywords reporter-feedback removed
  • Milestone set to 3.0
Note: See TracTickets for help on using tickets.