videosearch / youtube-direct-lite

Automatically exported from code.google.com/p/youtube-direct-lite
Apache License 2.0
0 stars 0 forks source link

use upload id to embed video on my website #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to use YouTube Direct Lite to allow my site visitors to upload 
videos directly to YouTube from my website. I also want to keep a list of the 
videos they have uploaded to YouTube in their account on my site AND embed that 
video into a node. 

Can I grab the id of the uploaded video and create the node on my website with 
the embedded video on the fly?

Basically, after they finish uploading their video I want to take the ID, 
generate a node (using Drupal) embed the new video and let them continue with 
adding their video to a category on my website (we have many more options than 
YouTube offers for categories.)

At this time I don't need anything other than the embed URL so I'm thinking 
that I can do this with YouTube Direct Lite rather than having to go the full 
YouTube Direct route.

Any help would be appreciated.

Thanks, K

Original issue reported on code.google.com by kappaluppa2@gmail.com on 8 Jul 2013 at 10:37

GoogleCodeExporter commented 8 years ago
What you describe is possible, but it would require some custom development on 
your part.

First, you'd have to host your own instance of YouTube Direct Lite instead of 
using the reference implementation.

Then you'd need to modify the JavaScript for each of the submission methods 
(Existing, New, and Webcam) to notify your server with the video id when 
there's a new submission, likely via a $.ajax() call to a web service endpoint 
you create. The most relevant places to put in that sort of thing would be

https://code.google.com/p/youtube-direct-lite/source/browse/static/js/ytdl/panel
s/existing.js#53
https://code.google.com/p/youtube-direct-lite/source/browse/static/js/ytdl/panel
s/postupload.js#26
https://code.google.com/p/youtube-direct-lite/source/browse/static/js/ytdl/panel
s/webcam.js#44

And then you'd have to take the list of video ids that you're told about and 
display them in some way, most likely using the <iframe> embedded player.

Original comment by je...@google.com on 10 Jul 2013 at 4:57