|
Q.
VideoQuota and protecting By Referrer.
You need to embed the WMP call inside IE, otherwise WMP does not correctly include the REFERER field (bug MS about this?). So instead of a raw link in your ASP file like this: <a href=mms://yourserver.com/video300.wmv>video300.wmv</a> Do this:
<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=240
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
Or even better:
<%
On Error Resume Next
lngMP70 = IsObject(CreateObject("WMPlayer.OCX"))
' Windows Media Player 7 Code
If (lngMP70) Then
response.write "<OBJECT ID=MediaPlayer "
response.write " CLASSID=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"
response.write
" standby=""Loading Microsoft Windows Media Player components..."" "
response.write
" TYPE=""application/x-oleobject"" width=""286"" height=""225"">"
response.write "<PARAM NAME=""url""
VALUE=""mms://0.0.0.0/BBurns/Ballowe_Closingbell.asf"">"
response.write "<PARAM NAME=""AutoStart"" VALUE=""true"">"
response.write "<PARAM NAME=""ShowControls"" VALUE=""1"">"
response.write "<PARAM NAME=""uiMode"" VALUE=""mini"">"
response.write "</OBJECT>"
' Windows Media Player 6.4 Code
Else
response.write "<OBJECT ID=MediaPlayer "
response.write " CLASSID=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
response.write "CODEBASE=http://activex.microsoft.com/
activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
response.write
" standby=""Loading Microsoft Windows Media Player components..."" "
response.write
" TYPE=""application/x-oleobject"" width=""286"" height=""225"">"
response.write "<PARAM NAME=""FileName""
VALUE=""mms://0.0.0.0/BBurns/Ballowe_Closingbell.asf"">"
response.write "<PARAM NAME=""AutoStart"" VALUE=""true"">"
response.write "<PARAM NAME=""ShowControls"" VALUE=""1"">"
response.write "</OBJECT>"
End If
response.End
%>
|
|