Drupal module to embed VdoCipher videos

Your videos on VdoCipher are protected and can only be played by an access token for each video view. This access token needs to be generated securely in your website backend. VdoCipher’s Drupal module handles this, making sure that you need only a single-line shortcode to add videos to your Drupal site.

Behind the scenes the module uses a shortcode-like syntax to parse and display videos. Videos can be displayed inside any node such as an article or a page or a custom content type. The markup of the content body is processed and the shortcode syntax is replaced with the player code.

Download here

  1. Download the module file from the link above.
  2. Upload the module file from the install new module page in your Drupal “install new module” page.
  3. Enable the uploaded module.
  4. Click on the configure link in the module page to complete your setup.
  5. Copy your API secret key from VdoCipher Dashboard > Config > General.
  6. Enter the API key in Drupal and save your settings.
  7. Save the configuration.
  8. Copy a video id from your VdoCipher dashboard. Edit an existing node in Drupal and add this code in any text field (replace 123456789 with id of a video).
    [vdo id=123456789]
  9. Open the article on a page. You should see the video player in your Drupal website.

Note on watermark adding.

The watermark can be added to your videos to imprint info about the logged in user or an image for branding. You can configure the watermark from the module configuration page. Check this article for more information on the structure and format required to add watermark text or image in the video. Please note that Drupal-7.x does not provide any APIs to get current user, for which reason the user name, user ID and user email cannot be configured in watermark. Our license server can identify the IP requesting the video with the date. A sample request using both IP address and date in the watermark is as follows

[{'type':'rtext','text':'[ip] [date.h:i:s A]','alpha':'0.8', 'color':'0xFF0000', 'size':'15', 'interval':'5000', 'skip':'2000'}]

A note about caching

OTP generated here is temporary. You can not cache this OTP and send it to multiple users as it might cause trouble. The OTP once used gets expired and can no longer be used to play video. Some extensions might try to automate the page rendering and especially when on pages which do not need login. The configuration must be set to make sure pages with embedded videos are not cached and cause error while playback.

For reference about how everything works, please check API reference.

Drupal FAQ

Q. I am seeing the message: Unauthorized
A. Most probably, you have extra spaces in the API key configuration. Go to the module configuration for VdoCipher and make sure the API key is correct.

Q. I am seeing message: Video not found
A. This would probably mean that the video id is not correct. The rich-text editor you are using to add the shortcode might have added extra characters. Content saved in the database is HTML while you are shown rendered HTML in the editor. Click on one of the “view source” option in your editor and try re-pasting the shortcode. Also, make sure there are no spaces before or after the equality sign.

Q. How to set this up for selling video as PPV or subscription?
A. The video can only be viewed by the person who has purchased a membership or a video. You need to set up Drupal permissions such as only those persons can view the assigned content-type which has video.

Q. The height and width are not what I want
A. The height and width are taken from the module configuration and overridden from the shortcode. Did I tell you, you can also add the height and width info like the following. In case the provided width is greater than the available width, the width is set to 100% of available width and height is adjusted to keep the same aspect ratio as provided by the settings.

Q. Why is this not integrated with the media module
A. That what was the idea when we started working on it. But turns out there are certain permission concerns that we need to understand to make sure that using the media module is alright for your video accessibility.

Q. How to manage permission on creating video playable contents
A. The shortcode for video can be added to any node and thus anybody who has the permission to create node(any content type) can add a shortcode to play the video. Note that comment is not a node. We understand this might be a problem for your set-up in a multi-user environment. We plan to solve this problem in the next version with either a custom content type or using the media module to make it easy to control permissions. At the very least, we can add a white-list of content-types which can only have a video embedded in it but it might not work in all cases.

Do let us know about your experiences setting up your secure video in Drupal to create your own PPV or subscription-based video portal. and how we can make the integration simpler.


You may also like...