I would like to be able to retrieve the video title from youtube and display it, how do I do that?

Comments

jrefano’s picture

Status: Postponed » Active

i have the same request. i can display an emvideo in my view no problem, but i want to also display the title of the video (as a field), pulled from youtube. possible?

aaron’s picture

Version: 6.x-1.0 » 6.x-1.9
Status: Active » Postponed

it's technically possible, though not easy. fyi, the title of the original youtube video is stored in the field's data array, under the raw/'http://www.w3.org/2005/Atom'/TITLE/0 element, so you could display it in your theme, for instance, with print check_plain($node->field_video[0]['data']['raw']['http://www.w3.org/2005/Atom']['TITLE'][0]); .

YouTube, Blip.TV, and possible Archive.org are currently the only providers fetching this data. It might be worth storing and displaying this metadata on a more general level. (The original author, perhaps, as well.) Similar to how we now grab the duration when available.

Patches are welcome.

sirkitree’s picture

Status: Active » Postponed

Maybe some token assignment in order to use this info in conjunction with auto_nodetitle?

I'd also like to explore the same concept with ratings. Title and Rating can be displayed within the player, but it would be nice to have this assigned to fields or just it's own metadata in general to use elsewhere. (just thinking aloud) Then I could explore a fivestar integration as well.

pieterdc’s picture

I would also like this, sirkitree.

klim_’s picture

subscribe