We recently had a customer whom we’d done a custom training class for and recorded via Camtasia and output as a wmv file. They wanted the video hosted as streaming video on a Domino server. It’s been awhile since I’d looked at this, and had a little trouble remembering/locating the process. Now that it’s fresh in my memory, I thought I’d record it for you (and myself) for future reference.Quick steps follow this discussion.
If this had been a flash file, it would have been a little easier, but since we’ve got a wmv, here’s how it works. First, if you’re not familiar with the Domino server’s httpd.cnf file, that’s where all the MIME types that the Domino server’s familiar with are recorded. It’s located in the data directory on the server. Edit this file with a text editor and confirm for yourself that by default, wmv is not a MIME type that Domino’s familiar with. Add the .wmv mime type as well as the .wvx mime type to the document, and confirm that the .asx mime type is already in the document. By default it should be. After you add the mime types to the httpd.cnf file, restart the http task on the server with “tell http restart”.
Once you’ve got the server ready, you need to put the movie file somewhere. Your choices are as a document attachment, as a file resource in a database, or in the Domino server’s html directory. The first is a poor choice as the file attachment will not be cached in browsers and it will pull it down every time it’s requested. Personally, I like it as a file resource as it travels with the application. If all you wanted to do was make the file available, then you could simply create an a href link to it and user’s will be able to download it. However, to make it stream, you should create a Page design element with an ASX tag structure in it. Most importantly, on the 1st tab of the properties box for the Page, set the content type to video/x-ms-wvx which alerts the browser that it should launch the associated player (Windows Media Player) and start loading the file. The contents inside the ASX tag structure point to the actual file resource.
With this design element in place, the last bit is to create a link to it from somewhere in your site with a standard a href tag. Notice below that we’ve added a type=”video/x-ms-wvx” parameter to the a href tag. That’s it, when user’s click on the link, media player should launch and the content should begin streaming.
- Edit the httpd.cnf file on the Domino server, located in the data directory.
- Add the following MIME type statements, or make sure they exist:
- AddType .wmv video/x-ms-wmv # Microsoft Media Player
- AddType .wvx video/x-ms-wvx # Microsoft streaming video
- Review the file, you should also find the following MIME entry already there
- restart http on the server
- Deposit the .wmv file either to the file system, or as a File Resources in your database.
- Create a link in your page as follows
- Create the stream_video page in your database with the following code
- <ASX VERSION=”3.0″>
- Set the page content type to be: video/x-ms-wvx
<REF HREF=”http://yourdomain/yourserver/yourdir/yourdb/yourmovie.wmv” />
There’s some automation and streamlining you could do here to put in path to db, or to pass in the requested resource, but I’ve kept this clean and simple. I’m sure there are probably some better ways to do this but it works for us. Feel free to post comments.