Streaming Video & Member-Based Restrictions in Sitecore
A Guide to Protecting Streaming Videos via Vimeo in Sitecore (when Brightcove isn't an Option)
Streaming video is a familiar component on the Web. Websites with membership capability often offer video that is only accessible to active account subscribers. Because of this, developers need the ability to restrict video access to account holders and prevent non-members from viewing protected content.
This post describes protected streaming media that is embeddable in Sitecore Web content. In this particular case, we will discuss protecting streaming media in Sitecore in conjunction with the third-party video provider Vimeo.
Here is a subset of the requirements that pertain to this post:
- A site visitor must have a member login to visit restricted areas of the site.
- Sitecore content items contain embedded streaming videos that are "members only" with role-based permissions.
- Only visitors with an authenticated role should be able to view these videos.
- Protected videos must only be available via the member section of the site and must not be available in any other form.
If a site visitor isn't authenticated and doesn't have permissions to view a protected video, then the visitor should not be able to view the streaming content. It should be invisible to the outside world and inaccessible in any form, with the exception of the website on which it is hosted.
If the Brightcove Media Framework is not an option, there are other alternatives, such as utilizing the advanced features of Vimeo Pro, which allows for domain based restrictions. Vimeo Pro offers a variety of friendly features that will allow a Sitecore developer to restrict video access permissions used in conjunction with Sitecore's membership provider.
In Sitecore, we can restrict content items based upon a member's role-based permissions. On that item, we can embed a Vimeo video and have it render on a sublayout.
So now we have protected a content item with an embedded Vimeo video. But how do we ensure that the video will not be accessible to the outside world? Vimeo Pro offers a variety of advanced options, including video streaming restriction features to help us to accomplish this goal, such as domain restrictions and non-embeddable videos.
Here are the steps to take to protect your video via the Vimeo Pro settings:
- Navigate to the Vimeo video's privacy tab.
- Enter Privacy Settings under the "Who Can Watch This Video" section. Select the "Hide this video from Vimeo.com" option.
- Scroll to the question, "Where can this video be embedded?" and select “Only on sites I choose.” Enter the domain of your website.
- Decide if you wish for visitors to be able to comment on the video.
- Scroll to the question, “What can people do with this video?” Uncheck the “Download the video” and “Add to their collections” option.
- Save changes.
- Navigate to the Video Settings / Embed Tab.
- Apply the desired player preferences settings
- Uncheck “Show Like button”
- Uncheck “Show Watch Later button”
- Uncheck “Show Share button”
- Uncheck “Show Embed button"
- Save changes.
Now that we've added domain restrictions to our video, it will only be accessible via the domain we specified.
About the Author
Leave A Reply