Feature for forcing Broadcast to Private
ldway - August 5, 2008 - 19:34
| Project: | Video Upload |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Would like to request that an administrator feature be added for forcing all new uploads on youtube for "Broadcast" to Private instead of public. This way site admins could approve uploaded videos on youtube before they are seen by general public.

#1
Does anyone know how I can hack the modules code to force this for all uploads to youtube to be private?
#2
This would be a good starting point:
http://code.google.com/apis/youtube/developers_guide_php.html#UploadingV...
The video object that gets sent to youtube is constructed in the zend_gdata.inc file, so if you really wanted all videos to be private, you could hack it in there.
If you manage to add the feature as an option, I'd be happy to apply the patch. I just don't have the bandwidth at the moment to do myself.
#3
I was able to find a hack through the link you provided...
If anyone else wants to make all uploads be "private" for the youtube broadcast properties so that they can approve uploaded videos by their users BEFORE publically available on youtube then here is instructions for the hack...
1... Open the zend_gdata.inc file in your video_upload modules directory.
2... Find the function: "_video_upload_gdata_construct_media_group"
3... In that function between the code for "//Video Category" and the code for "// developer tags" add the following code:
// ADD CODE FOR FORCING PRIVATE
$ytPrivateNamespace = 'http://gdata.youtube.com/schemas/2007';
$mediaGroup->extensionElements = array(
new Zend_Gdata_App_Extension_Element('yt:private', 'yt',
$ytPrivateNamespace)
);
// END CODE FOR FORCING PRIVATE
That it! - This will force all uploads to be "Broadcast Private" on youtube allowing you as the site administer to approve uploads BEFORE they are seen by the general public on youtube. Simply changing the Broadcast type of the video to "Public" on youtube will make it available to all to see. OR you can simply delete the video if you don't approve of it.
This would be really nice to be a part of the module as a general setting option down the road as an addition but for those that need this now this works for me. :)
-- Dave
#4
#5
I think if the video won't be uploaded to YouTube before the node had been published will be more make sense as #453458: Support for native drupal workflow