browngraphicslab / tag

Touch Art Gallery is an app that allows museum visitors to explore art using familiar touch gestures. This is the codebase for the TAG web application.
0 stars 0 forks source link

Support for youtube and vimeo embedings only #205

Closed JessicaFu closed 9 years ago

JessicaFu commented 10 years ago

Parse and error check for valid urls correctly. @tanaypadhi was looking into this. @lucyvk Can you also take a look since we're looking into regexp?

tanaypadhi commented 10 years ago

Done this. It should parse standard YouTube and Vimeo URLs. @EmilyReif could you review please?

EmilyReif commented 10 years ago

@tanaypadhi is this ready for review again?

tanaypadhi commented 10 years ago

Yep, sorry I forgot to remind you.

A couple of notes:

  1. I've updated this with what, as of late 2013, was YouTube's character set for video IDs
  2. This only works for standalone videos on YouTube + Vimeo, and not, say, videos that are part of playlists or, in Vimeo's case, groups.
  3. It only checks the characters in the ID, so if someone has a typo in their ID that's still within the character set (eg. replaces an alphabet with another alphabet), it still goes ahead and creates the associated media, and it's up to the person to figure out that the video isn't playing in the previewer.

Thanks!

JessicaFu commented 10 years ago

@tanaypadhi Can you reassigned this to be reviewed by someone else?

EmilyReif commented 10 years ago

Functionalitywise, looks great. It's catching the invalid ones and letting the good ones go.

Could you make the error box the same size/shape as the initial "embed" box, though?

lucyvk commented 9 years ago

done