<%
DIM iCurrentPosition, sFileName, iHeight, iWidth
'Set Defaults
'File name will add the prefix depending on the browser type
If request("sFileName") <> "" then
sFileName = request("sFileName")
else
Response.write("Oops. No video source was provided. Please ensure you are providing a valid video source file name as an argument to the URL. i.e. ?sFileName=""mms://server.com/PubPointname""")
Response.end
end if
If request("iCurrentPosition") <> "" then
iCurrentPosition = request("iCurrentPosition")
else
iCurrentPosition = "0"
end if
If request("iHeight") <> "" then
iHeight = request("iHeight")
else
iHeight = "400"
end if
If request("iWidth") <> "" then
iWidth = request("iWidth")
else
iWidth = "304"
end if
'Remove the fully qualified filename if file browser is NTML5 compatible
const PublishingPoint = "http://video.clerkshq.com/"
'const htmlPrefix = "http://vid.opengovideo.com/mp4/"
const htmlPrefix = "mp4\"
const htmlSuffix = ".mp4"
Html5Name = htmlPrefix & Replace(sFileName, PublishingPoint, "") & htmlSuffix
Function ReturnBrowser()
'Should be tested wtih ither browsers and versions before being reliable
DIM BrowserType
BrowserType = "unknown"
If Request.servervariables("HTTP_USER_AGENT") > "" then
BrowserType = Request.servervariables("HTTP_USER_AGENT")
end if
if InStr(BrowserType,"MSIE") > 0 then
ReturnBrowser = "IE"
end if
if InStr(BrowserType,"Trident") > 0 then
ReturnBrowser = "IE"
end if
if InStr(BrowserType,"Firefox") > 0 then
ReturnBrowser = "FF"
end if
if InStr(BrowserType,"Safari") > 0 then
ReturnBrowser = "HTML5"
ReturnBrowser = "SF"
end if
if InStr(BrowserType,"Chrome") > 0 then
ReturnBrowser = "CX"
end if
if InStr(BrowserType,"iPhone") > 0 then
ReturnBrowser = "HTML5"
end if
if InStr(BrowserType,"Android") > 0 then
ReturnBrowser = "HTML5"
end if
' Check for Mac
if InStr(BrowserType,"Mac") > 0 then
ReturnBrowser = "HTML5"
end if
end function
%>
<% if 1 = 2 then %>
<% end if %>
<% If ReturnBrowser() = "HTML5" then %>
<% elseif ReturnBrowser() = "IE" then %>
<% elseif ReturnBrowser() = "FF" OR ReturnBrowser() = "CX" then %>
<% else %>
Error (<% response.write (ReturnBrowser) %>) - Your browser doesn't seem to support Windows Video files. The Required Windows Media Plugin has not loaded
Please install the latest appropriate version of Microsoft Media Player and try back again. http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx