home *** CD-ROM | disk | FTP | other *** search
- <%@ Language="VBScript" %>
- <% Option Explicit %>
- <%'
- ' In order to support browsers that do not allow an embedded
- ' NetShow player, we want to trigger a NetShow player to launch
- ' as a standalone and feed it the reference information it needs
- ' to find the right ASF file to play
- '
- ' This asp file is never displayed. By setting the content type
- ' of the Response object to "video/x-ms-asf" the page instead
- ' will launch the application associated with this mime type,
- ' namely the NetShow player, and pass it the absolute http reference
- ' it requires.
- '
- Dim strASFPath ' this variable will store the absolute http reference to the asf file
- strASFPath = "http://" & Request.ServerVariables("SERVER_NAME")
- strASFPath = strASFPath & Request.ServerVariables("PATH_INFO")
-
- ' at this point, strASFPath contains an absolute reference to
- ' this page. For example, if the server name is MyServer and
- ' the application is stored in a virtual called Exair, then the value
- ' of strASFPath is now "http://MyServer/ExAir/Freqflyer/WeekLink.asp"
- ' The next line gets rid of the "WeekLink.asp" part
-
- strASFPath = left(strASFPath, len(strASFPath) - len("WeekLink.asp"))
-
- ' Now, we need to tack on the rest of the path to the asf file:
-
- strASFPath = strASFPath & "multimedia/k2demo288.asf"
-
- ' Finally, set the content type.
-
- Response.ContentType = "video/x-ms-asf"
-
- ' The text that follows this ASP script will be sent to the
- ' NetShow player so that it can find the correct file to play.
- %>
- [REFERENCE]
- REF1=<%= strASFPath %>
-