Using Player Verification

To ensure that only player files you have authorized are allowed to connect to your streams, do the following.

How to

  1. Create a configuration and a stream with Player Verification enabled (see Create a configuration). Your Account Representative will provide you the details for accessing the auth bin on NetStorage. If you are already using SWF Verification for your RTMP delivery over Flash Media Server, this is the same bin.
  2. Upload the uncompressed version of the SWF (uncompressed binary SWF) file to authorize for Media Services Live. When you export a SWF from Flex Builder™ or Flash Builder, it is compressed by default. In Flash CS4 and CS5, it is also compressed by default, although there is an option to save it as uncompressed. Either way, to make the process simpler for you, a simple uncompression application is available — SWF Authentication Utility.
  3. This online application allows you to upload your standard compressed SWF. It uncompresses it and then allows you to download it to your desktop. You can then upload it to the auth bin described in step 1 above.
  4. In the case of players that dynamically load sub-SWFs at run-time, the SWF you should use for verification is the one that controls (or establishes) the STAGE object in your player. So if a.swf loads b.swf, which uses HDNetStream, the SWF you should upload for Player Verification is a.swf—the one at the top of the display stack.
  5. Set the displayObject property on your HDNetStream instance by passing it a reference to any object that participates in the display stack and that has access to the stage property. Exactly which object you pass is unimportant. Since HDNetStream extends NetStream, it itself has no visibility into the player, and so you must provide it via this property. If you fail to set this property prior to calling play(), Player Verification will fail, even if you have uploaded the correct uncompressed SWF to your auth bin.
    After Player Verification is enabled, the Edge server starts delivering content and then queries the Flash client to authenticate itself. This process takes about 1.5 seconds. If the Edge server cannot successfully verify the SWF within 5 seconds, it terminates the connection. If authentication is successful, playback continues uninterrupted. Verification repeats itself with each new play() request the HDNetStream class makes.