MyTube is a content filter developed by the Electronic Frontier Foundation. It is designed to protect visitors' privacy while still allowing videos or other embedded content to be viewed on your site. MyTube works by automatically replacing user-submitted embed code with local image tags that are replaced with the embed code when clicked. This prevents Flash cookies, remote-site requests, and similar invasions of privacy from automatically plaguing visitors when they access your page because, until the user clicks play, no remote request is made to the third-party website. See here for an example.
Unlike existing filters for embed code, MyTube does not generate any embed code. Instead, it processes existing embeds, modifies them according to the administrator's settings, and converts them into clickable thumbnails. The thumbnails, when activated, will then use JQuery to swap themselves out for the original embed code. To ensure that user is making an educated choice about whether or not to load the embed (and to show the administrator cares about his/her privacy), a disclaimer text is also placed below the thumbnail, with a best-effort attempt to figure out the source, alerting users to the privacy concerns associated with loading an embedded object.
For your viewers, the experience is much like having Flashblock enabled for your entire site, except that most videos (such as YouTube) will have the correct thumbnails instead of a generic play button, and will automatically play the first time they're clicked on. This is done by downloading the thumbnail in question, and displaying it from the site's
public://mytube folder for recognized sites, while displaying a generic thumbnail for others, then modifying the embed code to autoplay when it does finally load. For unrecognized embed codes, the process is the same and MyTube should still swap it out for a generic thumbnail. This makes the process relatively transparent for those who are not technically-inclined or detail-oriented, but a noticeable gesture towards privacy for others. Additionally, without automatically loading embedded content (such as Flash), content on your site will load faster for the end users, making it more accessible to users with old computers or slow internet connections.
After installing the module, administrators should enable "MyTube Filtering" for any input formats that will allow embeds. It is strongly recommended that administrators then enable the HTML Filter and arrange it before MyTube; failure to do so means it may be possible for users to inject arbitrary scripts into your website using embeds. MyTube will not conflict with the HTML Filter; if you trust your users, you should whitelist each individual tag you wish to allow (MyTube will currently process
<param>). If you do not trust them (e.g. relatively anonymous users), then you should use a different filter that generates embed code (such as Video Filter) instead of allowing them to submit such dangerous code. Any tags the administrator wishes to restrict (such as
<iframe> tags) can be restricted without breaking MyTube's ability to filter other authorized (or in the case of video filter, generated) tags. MyTube will make a best-effort attempt to replace all kinds of embed code listed here, and for stability reasons, MyTube will automatically implement the HTML Corrector filter, whether that filter is enabled or not. If enabled, it should be noted that the HTML Corrector will be run twice, but the performance toll is negligible.
Beyond this initial setup, MyTube should require little if any configuration, but offers several customizable options (requires "administer mytube" permissions) for appearance on its settings page. All
<object> tags passed through the filter will be replaced with MyTube thumbnails, whether the source is recognized or not. Unrecognized sources will default to an included
default.gif thumbnail. For these individual videos, a custom thumbnail can be added by adding
thumb="$relative_directory" to the first affected tag. MyTube will also make a best-effort attempt to recognize the video source and display it in the privacy info text. Default thumbnails for YouTube™ and Vimeo™ videos are downloaded to
public://mytube automatically and cannot be overridden.
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Filters/Editors, Media
- Reported installs: 81 sites currently report using this module. View usage statistics.
- Downloads: 3,346
- Automated tests: Enabled
- Last modified: 8 October 2016
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.