In youtube, there's an option to use privacy-mode, where cookies are disabled for the guests of your site that play the video.

Here's the standard code:

<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/lEXZ2hfD3bU&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lEXZ2hfD3bU&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>

As opposed to privacy privacy mode, where the domain changes to www.youtube-nocookie.com, but everything else stays the same.

<object width="640" height="385"><param name="movie" value="http://www.youtube-nocookie.com/v/lEXZ2hfD3bU&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/lEXZ2hfD3bU&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>

Ideally, the site would accept either type of embed code and allow the site administrator to override them all to privacy mode or non privacy mode. I see a simple str_replace() as able to achieve this functionality. What do you think?

Comments

Mac Clemmens’s picture

Status: Active » Closed (fixed)

Canceling this -- this was meant for the Media: youtube module.