 |
| Securing
Flix Videos |
 |
| Contents |
|
Download
the SWF and FLA for this tutorial. |
| Top |
 |
 |
| Introduction |
 |
Piracy
of intellectual property is a major concern
for people posting media content on the Internet.
And many Flix users want to know how they can
secure their Flix (.swf) videos and prevent
piracy.
While no method provides 100% security (if
a viewer can see or hear a media file they can
capture it), there are a number of options available
that can provide a measure of protection. |
| Top |
 |
 |
| Protecting
video files using actionscript |
 |
It
is possible to use actionscript to protect your
Flix videos by instructing a video not to play
unless it originates from a specified server.
Using Flix Pro’s automatic player output, you can create a custom player
that will add actionscript to the first frame of your Flix Pro encoded video.
For a complete description of using this method to add actionscript to a Flix
encoded video, check out the Automatically adding actionscript to Flix Pro encoded
videos tutorial.
Here is the complete code:
okToPlay = FALSE;
siteURL = "http://www.wildform.com/tutorials/SecuringFlixVideos/secure/secure.swf";
if (_url.substr(0,siteURL.length) == siteURL)
{
okToPlay = TRUE;
}
if (!okToPlay)
{
getURL("http://www.wildform.com/tutorials/SecuringFlixVideos/secure/notallowed.html");
unloadMovie(_root);
} |
| Top |
 |
 |
| Watermarking |
 |
Another
quick method for preventing piracy is to add
a watermark to your output video. Flix Pro has
an automatic watermarking feature available in
the overlay window (view>overlay).
You can also embed the video .swf in another .swf. For instance, you can embed
it in a player that has your website address. You can use Flix Pro’s automatic
player output to do this. |
| Top |
 |
 |
| Preventing
caching of videos |
 |
Note: This method only works with .swf files played
in an HTML page.
When you post a Flix encoded video, or any other .swf file on a web page and
someone views it over the internet, the .swf file is cached (stored) in the viewer’s
temporary internet files folder. This is because of the progressive download
method used to play .swf files over the internet.
Using the following techniques, Flix video .swf’s (or any other .swf file)
can be prevented from being stored in the viewer’s browser cache.
(Note: Files must be played from an HTML page for these methods to work. In addition,
the META tags used below will only work with browsers that support these tags.)
There are a couple of methods you can use to ensure that .swf files are not cached: |
| Top |
 |
 |
| Using
the 'Expires' header |
 |
The
Expires header of an HTML document tells a browser
when a cached document should expire from the
cache.
Insert the text below between the <HEAD></HEAD> tags of the HTML
document containing the embedded .swf.
<!-- BEGIN INSERT -->
< META HTTP-EQUIV="Expires" CONTENT="-1">
< !-- END INSERT -->
Each and every time the Flix video is viewed it will automatically expire from
the cache. |
| Top |
 |
 |
| Using
the Pragma: No-Cache header |
 |
This
code directs the browser to not cache the document
at all.
Insert the following text after the closing </BODY> tag of the HTML page
containing the embedded .swf.
<!-- BEGIN INSERT -->
< HEAD>
< META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
< /HEAD>
< !-- END INSERT -->
Note: Cache-Control META HTTP-EQUIV tags are ignored and do not work in Internet
Explorer versions 4 or 5. |
| Top |
 |
 |
| Additional
Caching Considerations |
 |
Please
note that these methods of preventing caching
are not foolproof and there are ways of preventing
them from working. For instance, there is no
way to completely prevent caching in versions
of Internet Explorer earlier than 4.01 Service
Pack 2 .
Also, when you use the <HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> metatag
in the header section at the beginning of an HTML Web page, the Web page may
still be cached in the Temporary Internet Files folder because of the way metatags
are read by the browser. Consequently, Microsoft recommends placing another header
section at the end of the HTML document. For example:
<HTML>
< HEAD>
< META HTTP-EQUIV="REFRESH" CONTENT="5">
< TITLE> Pragma No-cache </TITLE>
< /HEAD>
< BODY>
This is an example of where to place the
second header section so that the "Pragama, No-Cache" metatag will
work as it is supposed to.
</BODY>
< HEAD>
< META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
< /HEAD>
< /HTML>
Many people choose to use both the expire and pragma cache control methods to
ensure that the .swf both expires and is not cached.
Here is a short example HTML page that uses both Pragma: no-cache and Expires:
-1:
< HTML><HEAD>
< META HTTP-EQUIV="Pragma" CONTENT="no-cache">
< META HTTP-EQUIV="Expires" CONTENT="-1">
< /HEAD><BODY>
< /BODY>
< /HTML>
(For more information on .swf caching, see Microsoft's articles here and here. |
| Top |
 |
 |
| Conclusion |
 |
| While
none of these methods are 100% foolproof, no
method of securing media files is. However, combining
two or more of these methods should yield a relatively
secure Flix video .swf file. |
| Top |