how to change from TCP to HTTPS

Questions related to uVMS

how to change from TCP to HTTPS

Postby rtrimarchi » Mon Nov 07, 2011 3:53 pm

Hello Admin,
I am trying to modify the "ViewUMS.aspx" web page of your new uVMS app.
In details....your ORIGINAL aspx page uses TCP Unicast protocol.
The below is the web page source code portion that does this:

function Play(player)
{
try
{
InitPlayer(player);

var o = document.getElementById(player);

o.UseTCP();
o.UseMediaServer("<%=m_sIP%>");

if("<%=m_sAlias%>" != "")
o.UseLiveAlias("<%=m_sAlias%>");
else
{
o.UseFile("<%=m_sFile%>");
o.EnableFlowControl(true, true);
}

if("<%=m_sProtocol%>" == "RTP")
o.UseRTPUnicast();
if("<%=m_sProtocol%>" == "MULTICAST")
o.UseRTPMulticast();

if("<%=m_sSID%>" != "")
o.UseSessionID("<%=m_sSID%>");

o.Play();
}
catch (e)
{
var code = "Play(\"" + player + "\")";
setTimeout(code, 1000);
}
}

I have tried to change the o.UseTCP() with o.UseHTTP() or o.UseHTTPS() within the "ViewUMS.aspx".

Unfortunately it does NOT work because the line code "o.UseMediaServer("<%=m_sIP%>") also ADD the Ureal media server TCP port number attached together with the domain name.

This causes the fail...

So instead of using the ("<%=m_sIP%>") variable....is there a way to have ONLY the domain name WITHOUT the PORT NUMBER ATTACHED ???

My corporate ONLY let me use the port 80 with HTTP or HTTPS.

Infact your example with uSessionAuth works perfectly even using the web-session auth type.

So I am tryint to change this new app (uVMS) to use HTTPS and NOT TCP

Can You help me ??

Thanks a lot in advance
Riccardo
rtrimarchi
 
Posts: 0
Joined: Mon Feb 28, 2011 5:00 am

Re: how to change from TCP to HTTPS

Postby admin » Tue Nov 08, 2011 12:25 pm

You can call o.UseHTTP()
and also instead of line o.UseMediaServer("<%=m_sIP%>");

just use something like o.UseMediaServer(MyIPAddress); (hardcode your ip address or domain name)

or, if you don't want to hardcode, then:
Using javascript, you can find the ':' character in the "<%=m_sIP%>" variable, and get rid of all the characters, beginning with ':'
admin
Site Admin
 
Posts: 1030
Joined: Fri Aug 21, 2009 10:13 am

Re: how to change from TCP to HTTPS

Postby rtrimarchi » Wed Nov 09, 2011 2:18 am

Got a few questions/clarifications:
1 - can I use <%=Request.ServerVariables["SERVER_NAME"].ToString()%> ???
2 - with this new app (uVMS) is there any OFFICIAL way to implement the HTTP/HTTPS method in addition to Flash and TCP methods ??

Thanks for the new app ;-)
rtrimarchi
 
Posts: 0
Joined: Mon Feb 28, 2011 5:00 am

Re: how to change from TCP to HTTPS

Postby rtrimarchi » Wed Nov 09, 2011 5:21 am

also...

If I replace the line:
***********************************************
o.UseMediaServer("<%=m_sIP%>");
**********************************************

with this new code:

****************************************************
<%dim myarray%>;
<%myarray=split(m_sIP,":")%>;
o.UseMediaServer("<%=myarray(0)%>");
****************************************************
Do you think it is going to work ?
rtrimarchi
 
Posts: 0
Joined: Mon Feb 28, 2011 5:00 am

Re: how to change from TCP to HTTPS

Postby admin » Wed Nov 09, 2011 8:39 am

This is not a JavaScript forum. Please do not post JavaScript questions.
No, your code will not work.

The following is the right code, I didn't test it though:

dim myarray;
myarray=split(<%=m_sIP%>,":");
o.UseMediaServer(myarray[0]);
admin
Site Admin
 
Posts: 1030
Joined: Fri Aug 21, 2009 10:13 am


Return to uVMS Discussions

Who is online

Users browsing this forum: No registered users and 1 guest