Author: solomax
Date: Wed Aug 17 07:35:54 2016
New Revision: 1756586
URL: http://svn.apache.org/viewvc?rev=1756586&view=rev
Log:
[OPENMEETINGS-1358] initial work to make screen-sharing applet to work over
tunneled RTMPS
Modified:
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/session/SessionManager.java
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/server/ISessionManager.java
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/moderation/moderationPanel.lzx
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/StartSharingEventBehavior.java
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/StartSharingButton.java
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
openmeetings/application/trunk/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/StartSharingButton.java
Modified:
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
Wed Aug 17 07:35:54 2016
@@ -61,6 +61,7 @@ import org.apache.openmeetings.util.Init
import org.apache.openmeetings.util.OmFileHelper;
import org.apache.openmeetings.util.OpenmeetingsVariables;
import org.apache.openmeetings.util.Version;
+import org.apache.wicket.util.string.StringValue;
import org.apache.wicket.util.string.Strings;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.adapter.ApplicationAdapter;
@@ -81,6 +82,7 @@ import org.springframework.beans.factory
public class ScopeApplicationAdapter extends ApplicationAdapter implements
IPendingServiceCallback {
private static final Logger log =
Red5LoggerFactory.getLogger(ScopeApplicationAdapter.class, webAppRootKey);
private static final String SECURITY_CODE_PARAM = "securityCode";
+ private static final String NATIVE_SSL_PARAM = "nativeSsl";
@Autowired
private ISessionManager sessionManager;
@@ -117,7 +119,9 @@ public class ScopeApplicationAdapter ext
@Override
public void resultReceived(IPendingServiceCall arg0) {
- // TODO Auto-generated method stub
+ if (log.isTraceEnabled()) {
+ log.trace("resultReceived:: {}", arg0);
+ }
}
@Override
@@ -174,11 +178,12 @@ public class ScopeApplicationAdapter ext
Map<String, Object> map = conn.getConnectParams();
String swfURL = map.containsKey("swfUrl") ?
(String)map.get("swfUrl") : "";
+ String tcUrl = map.containsKey("tcUrl") ?
(String)map.get("tcUrl") : "";
Map<String, Object> connParams = getConnParams(params);
String uid = (String)connParams.get("uid");
String securityCode =
(String)connParams.get(SECURITY_CODE_PARAM);
if (!Strings.isEmpty(securityCode)) {
- //FIXME TODO add better mechanism
+ //FIXME TODO add better mechanism, this is for external
applications like ffmpeg
Client parent =
sessionManager.getClientByPublicSID(securityCode, null);
if (parent == null ||
!parent.getScope().equals(conn.getScope().getName())) {
return rejectClient();
@@ -197,9 +202,24 @@ public class ScopeApplicationAdapter ext
return rejectClient();
}
}
- Client rcm =
sessionManager.addClientListItem(conn.getClient().getId(),
- conn.getScope().getName(), conn.getRemotePort(),
- conn.getRemoteAddress(), swfURL, null);
+ Client rcm = new Client();
+ rcm.setStreamid(conn.getClient().getId());
+ StringValue scn =
StringValue.valueOf(conn.getScope().getName());
+ rcm.setScope(scn.toString());
+ long roomId = scn.toLong(Long.MIN_VALUE);
+ if (Long.MIN_VALUE != roomId) {
+ rcm.setRoomId(roomId);
+ } else if (!"hibernate".equals(scn.toString())) {
+ return rejectClient();
+ }
+ rcm.setUserport(conn.getRemotePort());
+ rcm.setUserip(conn.getRemoteAddress());
+ rcm.setSwfurl(swfURL);
+ rcm.setTcUrl(tcUrl);
+
rcm.setNativeSsl(Boolean.TRUE.equals(connParams.get(NATIVE_SSL_PARAM)));
+ rcm.setPublicSID(uid);
+ rcm.setSecurityCode(securityCode);
+ rcm = sessionManager.add(rcm, null);
if (rcm == null) {
log.warn("Failed to create Client on room connect");
return false;
@@ -232,10 +252,6 @@ public class ScopeApplicationAdapter ext
log.debug("publishName :: " +
rcm.getStreamPublishName());
sessionManager.updateClientByStreamId(streamId, rcm,
false, null);
}
- if (!Strings.isEmpty(securityCode)) {
- rcm.setSecurityCode(securityCode);
- sessionManager.updateClientByStreamId(streamId, rcm,
false, null);
- }
// Log the User
conferenceLogDao.add(ConferenceLog.Type.clientConnect,
Modified:
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/session/SessionManager.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/session/SessionManager.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/session/SessionManager.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/session/SessionManager.java
Wed Aug 17 07:35:54 2016
@@ -35,6 +35,7 @@ import org.apache.openmeetings.db.dto.ba
import org.apache.openmeetings.db.dto.server.ClientSessionInfo;
import org.apache.openmeetings.db.entity.room.Client;
import org.apache.openmeetings.db.entity.server.Server;
+import org.apache.wicket.util.string.Strings;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@@ -74,6 +75,27 @@ public class SessionManager implements I
}
@Override
+ public Client add(Client c, Server server) {
+ if (server == null) {
+ server = serverUtil.getCurrentServer();
+ }
+ c.setConnectedSince(new Date());
+ c.setRoomEnter(new Date());
+ if (Strings.isEmpty(c.getPublicSID())) {
+ c.setPublicSID(UUID.randomUUID().toString());
+ }
+ c.setServer(server);
+
+ if (cache.containsKey(null, c.getStreamid())) {
+ log.error("Tried to add an existing Client " +
c.getStreamid());
+ return null;
+ }
+
+ cache.put(c.getStreamid(), c);
+ return c;
+ }
+
+ @Override
public Client addClientListItem(String streamId, String scopeName,
int remotePort, String remoteAddress, String swfUrl,
Server server) {
if (server == null) {
Modified:
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/server/ISessionManager.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/server/ISessionManager.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/server/ISessionManager.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/server/ISessionManager.java
Wed Aug 17 07:35:54 2016
@@ -42,6 +42,7 @@ public interface ISessionManager {
*/
void sessionStart();
+ Client add(Client c, Server server);
/**
* add a new client item
*
Modified:
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
Wed Aug 17 07:35:54 2016
@@ -287,7 +287,13 @@ public class Client implements IDataProv
// FIXME: Move to {@link ClientSession}
@Column(name = "swfurl", length=2048)
private String swfurl;
-
+
+ @Column(name = "tcurl", length=2048)
+ private String tcUrl;
+
+ @Column(name = "nativeSsl")
+ private boolean nativeSsl = false;
+
/**
* @see Client#getIsRecording()
*/
@@ -863,6 +869,22 @@ public class Client implements IDataProv
this.mobile = mobile;
}
+ public String getTcUrl() {
+ return tcUrl;
+ }
+
+ public void setTcUrl(String tcUrl) {
+ this.tcUrl = tcUrl;
+ }
+
+ public boolean isNativeSsl() {
+ return nativeSsl;
+ }
+
+ public void setNativeSsl(boolean nativeSsl) {
+ this.nativeSsl = nativeSsl;
+ }
+
@Override
public String toString() {
return "Client [streamid=" + streamid + ", publicSID=" +
publicSID + ", isScreenClient=" + screenClient
Modified:
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
Wed Aug 17 07:35:54 2016
@@ -19,290 +19,284 @@
-->
-
<class name="rtmpConnection" extends="node">
+ <switch>
+ <when property="$as3">
+ <passthrough>
+ import flash.net.NetConnection;
+ import flash.events.NetStatusEvent;
+ </passthrough>
+ </when>
+ </switch>
+
+ <attribute name="debug" value="false" type="boolean" />
+ <attribute name="client" value="null" />
+
+ <event name="onconnect"/>
+ <event name="onerror"/>
+ <event name="ondisconnect" />
+
+ <!-- this attribute holds a reference to the current/last called
netremoteCall,
+ in case of error you can debug that way which call did fail -->
+ <attribute name="lastCalled" value="null" />
+
+ <attribute name="src" value="" type="string"/>
+
+ <method name="connect">
+ this._nc = new NetConnection();
- <switch>
- <when property="$as3">
- <passthrough>
- import flash.net.NetConnection;
- import flash.events.NetStatusEvent;
- </passthrough>
- </when>
- </switch>
-
- <attribute name="debug" value="false" type="boolean" />
- <attribute name="client" value="null" />
-
- <event name="onconnect"/>
- <event name="onerror"/>
- <event name="ondisconnect" />
-
- <!-- this attribute holds a reference to the current/last called
netremoteCall,
- in case of error you can debug that way which call did fail -->
- <attribute name="lastCalled" value="null" />
-
- <attribute name="src" value="" type="string"/>
-
- <method name="connect">
- this._nc = new NetConnection();
-
- // local reference to rtmpconnection
- //this._nc.t = this;
-
- this._nc.proxyType = canvas.proxyType;
-
- var ok = this._nc.connect(src == "null" ? null : src, {uid: ''});
- if (this.debug) {
- if($debug) Debug.write("*** debug ***");
- }
-
- this._nc.addEventListener(NetStatusEvent.NET_STATUS, _onStatus);
-
- if($debug) Debug.write("devRtmpConnection/registerMethods()");
- client = {};
- client.setId = this.setId;
-
- this._nc.client = client;
- </method>
+ // local reference to rtmpconnection
+ //this._nc.t = this;
+
+ this._nc.proxyType = canvas.proxyType;
+
+ var ok = this._nc.connect(src == "null" ? null : src, {
+ uid: ''
+ , nativeSsl: 'best' == canvas.proxyType
+ });
+ if (this.debug) {
+ if($debug) Debug.write("*** debug ***");
+ }
- <method name="setId" args="tId">
- if ($debug) Debug.write("################ setId: ",
tId);
- canvas.setAttribute('streamid', tId);
- </method>
+ this._nc.addEventListener(NetStatusEvent.NET_STATUS, _onStatus);
- <method name="_onStatus" args="stats"><![CDATA[
- if ($debug) {
- Debug.write("devrtmpconnection", this, "_onStatus",
stats.info.code);
- }
-
- var msg = "";
- var s;
-
- switch (stats.info.code) {
-
- case "NetConnection.Connect.Success": {
- // The connection attempt succeeded.
- //canvas.currentNC is the reference to the NetConnection
that is used in the NetStream
- msg = stats.info.code;
- canvas.currentNC = this._nc;
- s = 2;
- break;
- }
-
- case "NetConnection.Connect.Closed": {
- msg = stats.info.code;
- this._nc = null;
- canvas.currentNC = null;
- s = 0;
- break;
- }
-
- default: {
- msg = stats.info.code;
- s = 0;
- break;
- }
-
- }
-
- this.setAttribute("status", msg);
-
- if (s == 2) {
- this.onconnect.sendEvent();
- } else {
- this.onerror.sendEvent();
- }
-
- ]]>
- </method>
-
- <method name="disconnect">
- if ($debug) Debug.write(" DISCONNECT ");
- if (this._nc != null) {
- this._nc.close();
- }
- </method>
-
- <method name="callRPC" args="func, obj, params">
- //if ($debug) Debug.write("*** call: func, obj, params",func,obj,
typeof (params) ,params.length);
- if (params.length != 0){
- <!--
- this._nc.call.apply(this._nc,arguments);
- -->
+ if($debug) Debug.write("devRtmpConnection/registerMethods()");
+ client = {};
+ client.setId = this.setId;
+
+ this._nc.client = client;
+ </method>
+
+ <method name="setId" args="tId">
+ if ($debug) Debug.write("################ setId: ", tId);
+ canvas.setAttribute('streamid', tId);
+ </method>
+
+ <method name="_onStatus" args="stats"><![CDATA[
+ if ($debug) {
+ Debug.write("devrtmpconnection", this, "_onStatus",
stats.info.code);
+ }
+
+ var msg = "";
+ var s;
+
+ switch (stats.info.code) {
+
+ case "NetConnection.Connect.Success": {
+ // The connection attempt succeeded.
+ //canvas.currentNC is the reference to the
NetConnection that is used in the NetStream
+ msg = stats.info.code;
+ canvas.currentNC = this._nc;
+ s = 2;
+ break;
+ }
+
+ case "NetConnection.Connect.Closed": {
+ msg = stats.info.code;
+ this._nc = null;
+ canvas.currentNC = null;
+ s = 0;
+ break;
+ }
+
+ default: {
+ msg = stats.info.code;
+ s = 0;
+ break;
+ }
+
+ }
+
+ this.setAttribute("status", msg);
+
+ if (s == 2) {
+ this.onconnect.sendEvent();
+ } else {
+ this.onerror.sendEvent();
+ }
+
+ ]]>
+ </method>
+
+ <method name="disconnect">
+ if ($debug) Debug.write(" DISCONNECT ");
+ if (this._nc != null) {
+ this._nc.close();
+ }
+ </method>
+
+ <method name="callRPC" args="func, obj, params">
+ //if ($debug) Debug.write("*** call: func, obj,
params",func,obj, typeof (params) ,params.length);
+ if (params.length != 0){
+ <!--
+ this._nc.call.apply(this._nc,arguments);
+ -->
if (params.length==1){
- this._nc.call(func, obj,params[0]);
+ this._nc.call(func, obj,params[0]);
} else if (params.length==2){
- this._nc.call(func, obj,params[0],params[1]);
+ this._nc.call(func, obj,params[0],params[1]);
} else if (params.length==3){
- this._nc.call(func,
obj,params[0],params[1],params[2]);
+ this._nc.call(func,
obj,params[0],params[1],params[2]);
} else if (params.length==4){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3]);
} else if (params.length==5){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4]);
} else if (params.length==6){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5]);
} else if (params.length==7){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6]);
} else if (params.length==8){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7]);
} else if (params.length==9){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8]);
} else if (params.length==10){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9]);
} else if (params.length==11){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10]);
} else if (params.length==12){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11]);
} else if (params.length==13){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12]);
} else if (params.length==14){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13]);
} else if (params.length==15){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14]);
} else if (params.length==16){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15]);
} else if (params.length==17){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16]);
} else if (params.length==18){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17]);
} else if (params.length==19){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18]);
} else if (params.length==20){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18],params[19]);
- }
- } else {
- this._nc.call(func, obj);
- }
- </method>
-
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18],params[19]);
+ }
+ } else {
+ this._nc.call(func, obj);
+ }
+ </method>
+
</class>
- <!---
- Net remote call.
- @todo Document netremotecall class.
- -->
- <class name="netremotecall" extends="node">
-
- <switch>
- <when property="$as3">
- <passthrough>
- import flash.net.Responder;
- </passthrough>
- </when>
- </switch>
-
- <!--- Name of the remote function. -->
- <attribute name="funcname" value="$once{null}" type="string" />
-
- <attribute name="remotecontext" value="null" />
-
- <attribute name="dataobject" value="null" />
-
- <attribute name="responder" value="null" />
-
- <!--- Data handling event. args="value" -->
- <event name="ondata" />
-
- <!--- Error handling event. -->
- <event name="onerror"/>
-
- <!--- Call the remote method, passing the array of params. -->
- <method name="callRPC" args="params"><![CDATA[
- if (this.funcname == null) {
- //Debug.write("No funcname given");
- if (this.onerror) this.onerror.sendEvent("No funcname given");
- return;
- }
-
- if (params == null) {
- params = new Array();
-
- var subnodes = this.subnodes;
- if (subnodes != null) {
- var i;
- var n = subnodes.length;
- for (i = 0; i < n; i++) {
- // If getValue method is declared in param, call that
- // instead to get value.
- var tsi = subnodes[i];
- //TODO: fixme
- //if ((tsi["getValue"] != null) &&
(tsi.getValue["prototype"] != null)) {
- // params[i] = tsi.getValue();
- // Debug.write("tsi.getValue():", tsi.getValue());
- //} else {
- // params[i] = tsi.value;
- //}
- params[i] = tsi.getValue();
- }
- }
-
- } else if (params.__proto__ != Array.prototype) {
- //Debug.write(this.name, "error: first argument (params) is
not an array");
- return -1;
- }
-
- //if ($debug) Debug.write("call", this, this.parent,
this.parent.status);
- var rtmpObject = null;
- if (this.parent instanceof lz.rtmpConnection){
- rtmpObject = this.parent;
- } else if(this.remotecontext instanceof lz.rtmpConnection){
- rtmpObject = this.remotecontext;
- } else {
- if ($debug) Debug.warn("ERROR: no remotecontext availible
abort call", this.funcname, this);
- return;
- }
- //Debug.write('call', this, rtmpObject, rtmpObject.status);
- //Debug.write('call', this.remotecontext);
- if (rtmpObject.debug) Debug.write('call', this, rtmpObject,
rtmpObject.status);
- rtmpObject.lastCalled = this;
-
- this.responder = new Responder(onResult);
-
- rtmpObject.callRPC(this.funcname, this.responder, params);
-
- ]]>
- </method>
-
- <!--- Handle the result returned from the remote method. -->
- <method name="onResult" args="value"><![CDATA[
- // Can be overriden.
- // Would be great if it can be used with dataobject,
- // but I don't know how to convert Array/primitive to
LzDataset/LzDataPointer.
- ////Debug.write("netremotecall", this, "onResult", value);
-
- if (this.dataobject!=null) {
- if ( this.dataobject instanceof LzDataset ) {
- //if ($debug) Debug.write("onResult:
",this,value,dataobject);
- var element = LzDataElement.valueToElement(value);
- this.dataobject.setData(element.childNodes);
- } else if ( this.dataobject instanceof LzDataElement ) {
- var element = LzDataElement.valueToElement(value);
- this.dataobject.appendChild( element );
- } else {
- //if ($debug) Debug.warn("dataobject is not LzDataset or
LzDataElement: ",this,this.dataobject,delegate);
- }
- }
- this.ondata.sendEvent(value);
- ]]>
- </method>
-
-
- </class>
-
-
- <!---
- Net parameter.
- Element to use inside netremotecall.
- @todo Document netparam class.
- -->
- <class name="netparam" extends="node">
-
- <!--- The value of the netparam. -->
- <attribute name="value" value="null"/>
-
- </class>
+<!---
+ Net remote call.
+ @todo Document netremotecall class.
+-->
+<class name="netremotecall" extends="node">
+ <switch>
+ <when property="$as3">
+ <passthrough>
+ import flash.net.Responder;
+ </passthrough>
+ </when>
+ </switch>
+
+ <!--- Name of the remote function. -->
+ <attribute name="funcname" value="$once{null}" type="string" />
+
+ <attribute name="remotecontext" value="null" />
+
+ <attribute name="dataobject" value="null" />
+
+ <attribute name="responder" value="null" />
+
+ <!--- Data handling event. args="value"-->
+ <event name="ondata" />
+
+ <!--- Error handling event. -->
+ <event name="onerror"/>
+
+ <!--- Call the remote method, passing the array of params. -->
+ <method name="callRPC" args="params"><![CDATA[
+ if (this.funcname == null) {
+ //Debug.write("No funcname given");
+ if (this.onerror) this.onerror.sendEvent("No funcname
given");
+ return;
+ }
+
+ if (params == null) {
+ params = new Array();
+
+ var subnodes = this.subnodes;
+ if (subnodes != null) {
+ var i;
+ var n = subnodes.length;
+ for (i = 0; i < n; i++) {
+ // If getValue method is declared in
param, call that
+ // instead to get value.
+ var tsi = subnodes[i];
+ //TODO: fixme
+ //if ((tsi["getValue"] != null) &&
(tsi.getValue["prototype"] != null)) {
+ // params[i] = tsi.getValue();
+ // Debug.write("tsi.getValue():",
tsi.getValue());
+ //} else {
+ // params[i] = tsi.value;
+ //}
+ params[i] = tsi.getValue();
+ }
+ }
+
+ } else if (params.__proto__ != Array.prototype) {
+ //Debug.write(this.name, "error: first argument
(params) is not an array");
+ return -1;
+ }
+
+ //if ($debug) Debug.write("call", this, this.parent,
this.parent.status);
+ var rtmpObject = null;
+ if (this.parent instanceof lz.rtmpConnection){
+ rtmpObject = this.parent;
+ } else if(this.remotecontext instanceof lz.rtmpConnection){
+ rtmpObject = this.remotecontext;
+ } else {
+ if ($debug) Debug.warn("ERROR: no remotecontext
availible abort call", this.funcname, this);
+ return;
+ }
+ //Debug.write('call', this, rtmpObject, rtmpObject.status);
+ //Debug.write('call', this.remotecontext);
+ if (rtmpObject.debug) Debug.write('call', this, rtmpObject,
rtmpObject.status);
+ rtmpObject.lastCalled = this;
+
+ this.responder = new Responder(onResult);
+
+ rtmpObject.callRPC(this.funcname, this.responder, params);
+
+ ]]>
+ </method>
+
+ <!--- Handle the result returned from the remote method. -->
+ <method name="onResult" args="value"><![CDATA[
+ // Can be overriden.
+ // Would be great if it can be used with dataobject,
+ // but I don't know how to convert Array/primitive to
LzDataset/LzDataPointer.
+ ////Debug.write("netremotecall", this, "onResult", value);
+
+ if (this.dataobject!=null) {
+ if ( this.dataobject instanceof LzDataset ) {
+ //if ($debug) Debug.write("onResult:
",this,value,dataobject);
+ var element =
LzDataElement.valueToElement(value);
+ this.dataobject.setData(element.childNodes);
+ } else if ( this.dataobject instanceof LzDataElement ) {
+ var element =
LzDataElement.valueToElement(value);
+ this.dataobject.appendChild( element );
+ } else {
+ //if ($debug) Debug.warn("dataobject is not
LzDataset or LzDataElement: ",this,this.dataobject,delegate);
+ }
+ }
+ this.ondata.sendEvent(value);
+ ]]>
+ </method>
+</class>
+<!---
+ Net parameter.
+ Element to use inside netremotecall.
+ @todo Document netparam class.
+-->
+<class name="netparam" extends="node">
+ <!--- The value of the netparam. -->
+ <attribute name="value" value="null"/>
+</class>
</library>
Modified:
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/moderation/moderationPanel.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/moderation/moderationPanel.lzx?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/moderation/moderationPanel.lzx
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/moderation/moderationPanel.lzx
Wed Aug 17 07:35:54 2016
@@ -96,7 +96,7 @@
<method name="checkForApplyScreen" args="record">
//TODO check if host is required for rtmps
- ExternalInterface.call("startSharing", canvas.publicSID,
canvas.thishib.getUrl());
+ ExternalInterface.call("startSharing", canvas.publicSID);
</method>
<labelText name="_roomName" fgcolor="0xFFFFFF" y="4" fontstyle="bold"
fontsize="12" />
Modified:
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
Wed Aug 17 07:35:54 2016
@@ -78,7 +78,6 @@ public class CoreScreenShare implements
public int defaultQuality = 1;
public int defaultFPS = 10;
public boolean showFPS = true;
- public boolean allowRemote = true;
private boolean allowRecording = true;
private boolean allowPublishing = true;
@@ -125,8 +124,7 @@ public class CoreScreenShare implements
defaultQuality = Integer.parseInt(args[3]);
defaultFPS = Integer.parseInt(args[4]);
showFPS = bool(args[5]);
- allowRemote = bool(args[6]);
- remoteEnabled = allowRemote;
+ remoteEnabled = bool(args[6]);
allowRecording = bool(args[7]);
allowPublishing = bool(args[8]);
@@ -146,13 +144,18 @@ public class CoreScreenShare implements
instance = new
RTMPScreenShare(this);
break;
case rtmpt:
- instance = new
RTMPTScreenShare(this);
+ instance = new
RTMPTScreenShare(this, false);
break;
case rtmps:
- RTMPSScreenShare client = new
RTMPSScreenShare(this);
- //NOT in use since 1.0.8-M3
client.setKeystoreBytes(Hex.decodeHex(args[9].toCharArray()));
-
client.setKeyStorePassword(args[10]);
- instance = client;
+ boolean nativeSsl =
bool(args[9]);
+ if (nativeSsl) {
+ RTMPSScreenShare client
= new RTMPSScreenShare(this);
+ //NOT in use since
1.0.8-M3 client.setKeystoreBytes(Hex.decodeHex(args[10].toCharArray()));
+
client.setKeyStorePassword(args[11]);
+ instance = client;
+ } else {
+ instance = new
RTMPTScreenShare(this, true);
+ }
break;
case rtmpe:
default:
@@ -657,31 +660,30 @@ public class CoreScreenShare implements
String method = call.getServiceMethodName();
Object o = call.getResult();
+ if (log.isTraceEnabled()) {
+ log.trace("Result Map Type " + (o == null ?
null : o.getClass().getName()));
+ log.trace("" + o);
+ }
+ @SuppressWarnings("unchecked")
+ Map<String, Object> returnMap = (o != null && o
instanceof Map) ? (Map<String, Object>) o : new HashMap<String, Object>();
log.trace("call ### get Method Name " + method);
if ("connect".equals(method)) {
- if (o instanceof Map) {
- @SuppressWarnings("unchecked")
- Map<String, Object> map = (Map<String,
Object>) o;
- Object code = map.get("code");
- if
("NetConnection.Connect.Rejected".equals(code) ||
"NetConnection.Connect.Failed".equals(code)) {
-
frame.setStatus(String.format("Error: %s %s", code, map.get("description")));
- return;
- }
+ Object code = returnMap.get("code");
+ if
("NetConnection.Connect.Rejected".equals(code) ||
"NetConnection.Connect.Failed".equals(code)) {
+ frame.setStatus(String.format("Error:
%s %s", code, returnMap.get("description")));
+ return;
}
isConnected = true;
setConnectionAsSharingClient();
} else if
("setConnectionAsSharingClient".equals(method)) {
- @SuppressWarnings("unchecked")
- Map<String, Object> returnMap = (Map<String,
Object>) o;
-
- if (o == null ||
!bool(returnMap.get("alreadyPublished"))) {
+ if (!bool(returnMap.get("alreadyPublished"))) {
log.trace("Stream not yet started - do
it ");
instance.createStream(this);
} else {
log.trace("The Stream was already
started ");
}
- if (returnMap != null) {
+ if (o != null) {
Object modus = returnMap.get("modus");
if ("startStreaming".equals(modus)) {
frame.setSharingStatus(true,
false);
@@ -703,8 +705,8 @@ public class CoreScreenShare implements
}
} else if ("createStream".equals(method)) {
if (startRecording || startStreaming) {
- if (call.getResult() != null) {
-
getCapture().setStreamId((Number)call.getResult());
+ if (o != null && o instanceof Number) {
+
getCapture().setStreamId((Number)o);
}
log.debug("createPublishStream result
stream id: {}; name: {}", getCapture().getStreamId(), publishName);
instance.publish(getCapture().getStreamId(), publishName, "live", this);
@@ -717,13 +719,6 @@ public class CoreScreenShare implements
}
}
} else if ("screenSharerAction".equals(method)) {
- if (log.isTraceEnabled()) {
- log.trace("Result Map Type " + (o ==
null ? null : o.getClass().getName()));
- log.trace("" + o);
- }
-
- @SuppressWarnings("unchecked")
- Map<String, Object> returnMap = (Map<String,
Object>)o;
Object result = returnMap.get("result");
if ("stopAll".equals(result)) {
log.trace("Stopping to stream, there is
neither a Desktop Sharing nor Recording anymore");
Modified:
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
Wed Aug 17 07:35:54 2016
@@ -31,8 +31,11 @@ public class RTMPTScreenShare extends RT
private final CoreScreenShare core;
- public RTMPTScreenShare(CoreScreenShare core) {
+ public RTMPTScreenShare(CoreScreenShare core, boolean secure) {
this.core = core;
+ if (secure) {
+ protocol = "rtmps";
+ }
};
//
------------------------------------------------------------------------
Modified:
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
Wed Aug 17 07:35:54 2016
@@ -613,7 +613,7 @@ public class ScreenSharerFrame extends J
remoteEnabled.setBackground(Color.WHITE);
remoteEnabled.setSelected(core.isRemoteEnabled());
remoteEnabled.setBounds(10, 10, 450, 24);
- remoteEnabled.setEnabled(core.allowRemote);
+ remoteEnabled.setEnabled(core.isRemoteEnabled());
remoteEnabled.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Modified:
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
Wed Aug 17 07:35:54 2016
@@ -46,6 +46,7 @@
<argument>$allowRemote</argument>
<argument>$allowRecording</argument>
<argument>$allowPublishing</argument>
+ <argument>$native</argument>
<argument>$keystore</argument>
<argument>$password</argument>
</application-desc>
Modified:
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
Wed Aug 17 07:35:54 2016
@@ -71,7 +71,6 @@ public class RoomPanel extends BasePanel
private static final long serialVersionUID = 1L;
private static final String WICKET_ROOM_ID = "wicketroomid";
public static final String PARAM_PUBLIC_SID = "publicSid";
- public static final String PARAM_URL = "url";
public static final String SWF_TYPE_NETWORK = "network";
private static final Logger log =
Red5LoggerFactory.getLogger(RoomPanel.class, webAppRootKey);
private final InvitationDialog invite;
@@ -252,7 +251,7 @@ public class RoomPanel extends BasePanel
@Override
public void renderHead(Component component,
IHeaderResponse response) {
super.renderHead(component, response);
- response.render(new
PriorityHeaderItem(JavaScriptHeaderItem.forScript(getNamedFunction("startSharing",
this, explicit(PARAM_PUBLIC_SID), explicit(PARAM_URL)), "startSharing")));
+ response.render(new
PriorityHeaderItem(JavaScriptHeaderItem.forScript(getNamedFunction("startSharing",
this, explicit(PARAM_PUBLIC_SID)), "startSharing")));
}
});
}
Modified:
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/StartSharingEventBehavior.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/StartSharingEventBehavior.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/StartSharingEventBehavior.java
(original)
+++
openmeetings/application/branches/3.1.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/StartSharingEventBehavior.java
Wed Aug 17 07:35:54 2016
@@ -27,7 +27,6 @@ import static org.apache.openmeetings.we
import static org.apache.openmeetings.web.app.WebSession.getLanguage;
import static org.apache.openmeetings.web.room.RoomBroadcaster.getClient;
import static org.apache.openmeetings.web.room.RoomPanel.PARAM_PUBLIC_SID;
-import static org.apache.openmeetings.web.room.RoomPanel.PARAM_URL;
import static org.apache.openmeetings.web.util.CallbackFunctionHelper.getParam;
import java.io.File;
@@ -94,8 +93,6 @@ public class StartSharingEventBehavior e
ConfigurationDao cfgDao =
getBean(ConfigurationDao.class);
app = IOUtils.toString(jnlp, StandardCharsets.UTF_8);
String baseUrl = cfgDao.getBaseUrl();
- String _url = getParam(getComponent(),
PARAM_URL).toString();
- URI url = new URI(_url);
Room room = getBean(RoomDao.class).get(roomId);
String publicSid = getParam(getComponent(),
PARAM_PUBLIC_SID).toString();
SessionManager sessionManager =
getBean(SessionManager.class);
@@ -103,13 +100,15 @@ public class StartSharingEventBehavior e
if (rc == null) {
throw new
RuntimeException(String.format("Unable to find client by publicSID '%s'",
publicSid));
}
+ String _url = rc.getTcUrl();
+ URI url = new URI(_url);
String path = url.getPath();
path = path.substring(path.lastIndexOf('/') + 1);
if (Strings.isEmpty(path) || rc.getRoomId() == null ||
!path.equals(rc.getRoomId().toString()) || !rc.getRoomId().equals(roomId)) {
throw new
RuntimeException(String.format("Invalid room id passed %s, expected, %s", path,
roomId));
}
Protocol protocol = Protocol.valueOf(url.getScheme());
- app = addKeystore(app, protocol).replace("$codebase",
baseUrl + "screenshare")
+ app = addKeystore(rc, app,
protocol).replace("$codebase", baseUrl + "screenshare")
.replace("$applicationName",
cfgDao.getAppName())
.replace("$url", _url)
.replace("$publicSid", publicSid)
@@ -151,7 +150,7 @@ public class StartSharingEventBehavior e
return result.toString();
}
- private static String addKeystore(String app, Protocol protocol) {
+ private static String addKeystore(Client rc, String app, Protocol
protocol) {
log.debug("RTMP Sharer Keystore :: start");
String keystore = "--dummy--", password = "--dummy--";
if (Protocol.rtmps == protocol) {
@@ -189,7 +188,8 @@ public class StartSharingEventBehavior e
}
}
}
- return app.replace("$keystore", CDATA_BEGIN + keystore +
CDATA_END)
+ return app.replace("$native", "" + rc.isNativeSsl())
+ .replace("$keystore", CDATA_BEGIN + keystore +
CDATA_END)
.replace("$password", CDATA_BEGIN + password +
CDATA_END);
}
}
Modified:
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
Wed Aug 17 07:35:54 2016
@@ -93,6 +93,7 @@ import org.springframework.beans.factory
public class ScopeApplicationAdapter extends ApplicationAdapter implements
IPendingServiceCallback {
private static final Logger log =
Red5LoggerFactory.getLogger(ScopeApplicationAdapter.class, webAppRootKey);
private static final String SECURITY_CODE_PARAM = "securityCode";
+ private static final String NATIVE_SSL_PARAM = "nativeSsl";
@Autowired
private ISessionManager sessionManager;
@@ -184,7 +185,7 @@ public class ScopeApplicationAdapter ext
String uid = (String)connParams.get("uid");
String securityCode =
(String)connParams.get(SECURITY_CODE_PARAM);
if (!Strings.isEmpty(securityCode)) {
- //FIXME TODO add better mechanism
+ //FIXME TODO add better mechanism, this is for external
applications like ffmpeg
Client parent =
sessionManager.getClientByPublicSID(securityCode, null);
if (parent == null ||
!parent.getScope().equals(conn.getScope().getName())) {
return rejectClient();
@@ -220,6 +221,7 @@ public class ScopeApplicationAdapter ext
rcm.setUserip(conn.getRemoteAddress());
rcm.setSwfurl(swfURL);
rcm.setTcUrl(tcUrl);
+
rcm.setNativeSsl(Boolean.TRUE.equals(connParams.get(NATIVE_SSL_PARAM)));
rcm.setPublicSID(uid);
rcm.setSecurityCode(securityCode);
rcm =
sessionManager.add(((IApplication)Application.get(OpenmeetingsVariables.wicketApplicationName)).updateClient(rcm),
null);
Modified:
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
Wed Aug 17 07:35:54 2016
@@ -290,7 +290,10 @@ public class Client implements IDataProv
@Column(name = "tcurl", length=2048)
private String tcUrl;
-
+
+ @Column(name = "nativeSsl")
+ private boolean nativeSsl = false;
+
/**
* @see Client#getIsRecording()
*/
@@ -874,6 +877,14 @@ public class Client implements IDataProv
this.tcUrl = tcUrl;
}
+ public boolean isNativeSsl() {
+ return nativeSsl;
+ }
+
+ public void setNativeSsl(boolean nativeSsl) {
+ this.nativeSsl = nativeSsl;
+ }
+
@Override
public String toString() {
return "Client [streamid=" + streamid + ", publicSID=" +
publicSID + ", isScreenClient=" + screenClient
Modified:
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx
Wed Aug 17 07:35:54 2016
@@ -199,6 +199,7 @@
var wicketsid = lz.Browser.getInitArg('wicketsid');
if (wicketsid != undefined) {
canvas.setAttribute('wicketsid', wicketsid);
+ canvas.setAttribute('sessionId', wicketsid);
}
var uid = lz.Browser.getInitArg('uid');
if (!!uid) {
Modified:
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/rtmpConnection.lzx
Wed Aug 17 07:35:54 2016
@@ -19,290 +19,284 @@
-->
-
<class name="rtmpConnection" extends="node">
+ <switch>
+ <when property="$as3">
+ <passthrough>
+ import flash.net.NetConnection;
+ import flash.events.NetStatusEvent;
+ </passthrough>
+ </when>
+ </switch>
+
+ <attribute name="debug" value="false" type="boolean" />
+ <attribute name="client" value="null" />
+
+ <event name="onconnect"/>
+ <event name="onerror"/>
+ <event name="ondisconnect" />
+
+ <!-- this attribute holds a reference to the current/last called
netremoteCall,
+ in case of error you can debug that way which call did fail -->
+ <attribute name="lastCalled" value="null" />
+
+ <attribute name="src" value="" type="string"/>
+
+ <method name="connect">
+ this._nc = new NetConnection();
- <switch>
- <when property="$as3">
- <passthrough>
- import flash.net.NetConnection;
- import flash.events.NetStatusEvent;
- </passthrough>
- </when>
- </switch>
-
- <attribute name="debug" value="false" type="boolean" />
- <attribute name="client" value="null" />
-
- <event name="onconnect"/>
- <event name="onerror"/>
- <event name="ondisconnect" />
-
- <!-- this attribute holds a reference to the current/last called
netremoteCall,
- in case of error you can debug that way which call did fail -->
- <attribute name="lastCalled" value="null" />
-
- <attribute name="src" value="" type="string"/>
-
- <method name="connect">
- this._nc = new NetConnection();
-
- // local reference to rtmpconnection
- //this._nc.t = this;
-
- this._nc.proxyType = canvas.proxyType;
-
- var ok = this._nc.connect(src == "null" ? null : src, {uid:
canvas.publicSID});
- if (this.debug) {
- if($debug) Debug.write("*** debug ***");
- }
-
- this._nc.addEventListener(NetStatusEvent.NET_STATUS, _onStatus);
-
- if($debug) Debug.write("devRtmpConnection/registerMethods()");
- client = {};
- client.setId = this.setId;
-
- this._nc.client = client;
- </method>
+ // local reference to rtmpconnection
+ //this._nc.t = this;
+
+ this._nc.proxyType = canvas.proxyType;
+
+ var ok = this._nc.connect(src == "null" ? null : src, {
+ uid: canvas.publicSID
+ , nativeSsl: 'best' == canvas.proxyType
+ });
+ if (this.debug) {
+ if($debug) Debug.write("*** debug ***");
+ }
- <method name="setId" args="tId">
- if ($debug) Debug.write("################ setId: ",
tId);
- canvas.setAttribute('streamid', tId);
- </method>
+ this._nc.addEventListener(NetStatusEvent.NET_STATUS, _onStatus);
- <method name="_onStatus" args="stats"><![CDATA[
- if ($debug) {
- Debug.write("devrtmpconnection", this, "_onStatus",
stats.info.code);
- }
-
- var msg = "";
- var s;
-
- switch (stats.info.code) {
-
- case "NetConnection.Connect.Success": {
- // The connection attempt succeeded.
- //canvas.currentNC is the reference to the NetConnection
that is used in the NetStream
- msg = stats.info.code;
- canvas.currentNC = this._nc;
- s = 2;
- break;
- }
-
- case "NetConnection.Connect.Closed": {
- msg = stats.info.code;
- this._nc = null;
- canvas.currentNC = null;
- s = 0;
- break;
- }
-
- default: {
- msg = stats.info.code;
- s = 0;
- break;
- }
-
- }
-
- this.setAttribute("status", msg);
-
- if (s == 2) {
- this.onconnect.sendEvent();
- } else {
- this.onerror.sendEvent();
- }
-
- ]]>
- </method>
-
- <method name="disconnect">
- if ($debug) Debug.write(" DISCONNECT ");
- if (this._nc != null) {
- this._nc.close();
- }
- </method>
-
- <method name="callRPC" args="func, obj, params">
- //if ($debug) Debug.write("*** call: func, obj, params",func,obj,
typeof (params) ,params.length);
- if (params.length != 0){
- <!--
- this._nc.call.apply(this._nc,arguments);
- -->
+ if($debug) Debug.write("devRtmpConnection/registerMethods()");
+ client = {};
+ client.setId = this.setId;
+
+ this._nc.client = client;
+ </method>
+
+ <method name="setId" args="tId">
+ if ($debug) Debug.write("################ setId: ", tId);
+ canvas.setAttribute('streamid', tId);
+ </method>
+
+ <method name="_onStatus" args="stats"><![CDATA[
+ if ($debug) {
+ Debug.write("devrtmpconnection", this, "_onStatus",
stats.info.code);
+ }
+
+ var msg = "";
+ var s;
+
+ switch (stats.info.code) {
+
+ case "NetConnection.Connect.Success": {
+ // The connection attempt succeeded.
+ //canvas.currentNC is the reference to the
NetConnection that is used in the NetStream
+ msg = stats.info.code;
+ canvas.currentNC = this._nc;
+ s = 2;
+ break;
+ }
+
+ case "NetConnection.Connect.Closed": {
+ msg = stats.info.code;
+ this._nc = null;
+ canvas.currentNC = null;
+ s = 0;
+ break;
+ }
+
+ default: {
+ msg = stats.info.code;
+ s = 0;
+ break;
+ }
+
+ }
+
+ this.setAttribute("status", msg);
+
+ if (s == 2) {
+ this.onconnect.sendEvent();
+ } else {
+ this.onerror.sendEvent();
+ }
+
+ ]]>
+ </method>
+
+ <method name="disconnect">
+ if ($debug) Debug.write(" DISCONNECT ");
+ if (this._nc != null) {
+ this._nc.close();
+ }
+ </method>
+
+ <method name="callRPC" args="func, obj, params">
+ //if ($debug) Debug.write("*** call: func, obj,
params",func,obj, typeof (params) ,params.length);
+ if (params.length != 0){
+ <!--
+ this._nc.call.apply(this._nc,arguments);
+ -->
if (params.length==1){
- this._nc.call(func, obj,params[0]);
+ this._nc.call(func, obj,params[0]);
} else if (params.length==2){
- this._nc.call(func, obj,params[0],params[1]);
+ this._nc.call(func, obj,params[0],params[1]);
} else if (params.length==3){
- this._nc.call(func,
obj,params[0],params[1],params[2]);
+ this._nc.call(func,
obj,params[0],params[1],params[2]);
} else if (params.length==4){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3]);
} else if (params.length==5){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4]);
} else if (params.length==6){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5]);
} else if (params.length==7){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6]);
} else if (params.length==8){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7]);
} else if (params.length==9){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8]);
} else if (params.length==10){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9]);
} else if (params.length==11){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10]);
} else if (params.length==12){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11]);
} else if (params.length==13){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12]);
} else if (params.length==14){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13]);
} else if (params.length==15){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14]);
} else if (params.length==16){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15]);
} else if (params.length==17){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16]);
} else if (params.length==18){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17]);
} else if (params.length==19){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18]);
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18]);
} else if (params.length==20){
- this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18],params[19]);
- }
- } else {
- this._nc.call(func, obj);
- }
- </method>
-
+ this._nc.call(func,
obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18],params[19]);
+ }
+ } else {
+ this._nc.call(func, obj);
+ }
+ </method>
+
</class>
- <!---
- Net remote call.
- @todo Document netremotecall class.
- -->
- <class name="netremotecall" extends="node">
-
- <switch>
- <when property="$as3">
- <passthrough>
- import flash.net.Responder;
- </passthrough>
- </when>
- </switch>
-
- <!--- Name of the remote function. -->
- <attribute name="funcname" value="$once{null}" type="string" />
-
- <attribute name="remotecontext" value="null" />
-
- <attribute name="dataobject" value="null" />
-
- <attribute name="responder" value="null" />
-
- <!--- Data handling event. args="value" -->
- <event name="ondata" />
-
- <!--- Error handling event. -->
- <event name="onerror"/>
-
- <!--- Call the remote method, passing the array of params. -->
- <method name="callRPC" args="params"><![CDATA[
- if (this.funcname == null) {
- //Debug.write("No funcname given");
- if (this.onerror) this.onerror.sendEvent("No funcname given");
- return;
- }
-
- if (params == null) {
- params = new Array();
-
- var subnodes = this.subnodes;
- if (subnodes != null) {
- var i;
- var n = subnodes.length;
- for (i = 0; i < n; i++) {
- // If getValue method is declared in param, call that
- // instead to get value.
- var tsi = subnodes[i];
- //TODO: fixme
- //if ((tsi["getValue"] != null) &&
(tsi.getValue["prototype"] != null)) {
- // params[i] = tsi.getValue();
- // Debug.write("tsi.getValue():", tsi.getValue());
- //} else {
- // params[i] = tsi.value;
- //}
- params[i] = tsi.getValue();
- }
- }
-
- } else if (params.__proto__ != Array.prototype) {
- //Debug.write(this.name, "error: first argument (params) is
not an array");
- return -1;
- }
-
- //if ($debug) Debug.write("call", this, this.parent,
this.parent.status);
- var rtmpObject = null;
- if (this.parent instanceof lz.rtmpConnection){
- rtmpObject = this.parent;
- } else if(this.remotecontext instanceof lz.rtmpConnection){
- rtmpObject = this.remotecontext;
- } else {
- if ($debug) Debug.warn("ERROR: no remotecontext availible
abort call", this.funcname, this);
- return;
- }
- //Debug.write('call', this, rtmpObject, rtmpObject.status);
- //Debug.write('call', this.remotecontext);
- if (rtmpObject.debug) Debug.write('call', this, rtmpObject,
rtmpObject.status);
- rtmpObject.lastCalled = this;
-
- this.responder = new Responder(onResult);
-
- rtmpObject.callRPC(this.funcname, this.responder, params);
-
- ]]>
- </method>
-
- <!--- Handle the result returned from the remote method. -->
- <method name="onResult" args="value"><![CDATA[
- // Can be overriden.
- // Would be great if it can be used with dataobject,
- // but I don't know how to convert Array/primitive to
LzDataset/LzDataPointer.
- ////Debug.write("netremotecall", this, "onResult", value);
-
- if (this.dataobject!=null) {
- if ( this.dataobject instanceof LzDataset ) {
- //if ($debug) Debug.write("onResult:
",this,value,dataobject);
- var element = LzDataElement.valueToElement(value);
- this.dataobject.setData(element.childNodes);
- } else if ( this.dataobject instanceof LzDataElement ) {
- var element = LzDataElement.valueToElement(value);
- this.dataobject.appendChild( element );
- } else {
- //if ($debug) Debug.warn("dataobject is not LzDataset or
LzDataElement: ",this,this.dataobject,delegate);
- }
- }
- this.ondata.sendEvent(value);
- ]]>
- </method>
-
-
- </class>
-
-
- <!---
- Net parameter.
- Element to use inside netremotecall.
- @todo Document netparam class.
- -->
- <class name="netparam" extends="node">
-
- <!--- The value of the netparam. -->
- <attribute name="value" value="null"/>
-
- </class>
+<!---
+ Net remote call.
+ @todo Document netremotecall class.
+-->
+<class name="netremotecall" extends="node">
+ <switch>
+ <when property="$as3">
+ <passthrough>
+ import flash.net.Responder;
+ </passthrough>
+ </when>
+ </switch>
+
+ <!--- Name of the remote function. -->
+ <attribute name="funcname" value="$once{null}" type="string" />
+
+ <attribute name="remotecontext" value="null" />
+
+ <attribute name="dataobject" value="null" />
+
+ <attribute name="responder" value="null" />
+
+ <!--- Data handling event. args="value"-->
+ <event name="ondata" />
+
+ <!--- Error handling event. -->
+ <event name="onerror"/>
+
+ <!--- Call the remote method, passing the array of params. -->
+ <method name="callRPC" args="params"><![CDATA[
+ if (this.funcname == null) {
+ //Debug.write("No funcname given");
+ if (this.onerror) this.onerror.sendEvent("No funcname
given");
+ return;
+ }
+
+ if (params == null) {
+ params = new Array();
+
+ var subnodes = this.subnodes;
+ if (subnodes != null) {
+ var i;
+ var n = subnodes.length;
+ for (i = 0; i < n; i++) {
+ // If getValue method is declared in
param, call that
+ // instead to get value.
+ var tsi = subnodes[i];
+ //TODO: fixme
+ //if ((tsi["getValue"] != null) &&
(tsi.getValue["prototype"] != null)) {
+ // params[i] = tsi.getValue();
+ // Debug.write("tsi.getValue():",
tsi.getValue());
+ //} else {
+ // params[i] = tsi.value;
+ //}
+ params[i] = tsi.getValue();
+ }
+ }
+
+ } else if (params.__proto__ != Array.prototype) {
+ //Debug.write(this.name, "error: first argument
(params) is not an array");
+ return -1;
+ }
+
+ //if ($debug) Debug.write("call", this, this.parent,
this.parent.status);
+ var rtmpObject = null;
+ if (this.parent instanceof lz.rtmpConnection){
+ rtmpObject = this.parent;
+ } else if(this.remotecontext instanceof lz.rtmpConnection){
+ rtmpObject = this.remotecontext;
+ } else {
+ if ($debug) Debug.warn("ERROR: no remotecontext
availible abort call", this.funcname, this);
+ return;
+ }
+ //Debug.write('call', this, rtmpObject, rtmpObject.status);
+ //Debug.write('call', this.remotecontext);
+ if (rtmpObject.debug) Debug.write('call', this, rtmpObject,
rtmpObject.status);
+ rtmpObject.lastCalled = this;
+
+ this.responder = new Responder(onResult);
+
+ rtmpObject.callRPC(this.funcname, this.responder, params);
+
+ ]]>
+ </method>
+
+ <!--- Handle the result returned from the remote method. -->
+ <method name="onResult" args="value"><![CDATA[
+ // Can be overriden.
+ // Would be great if it can be used with dataobject,
+ // but I don't know how to convert Array/primitive to
LzDataset/LzDataPointer.
+ ////Debug.write("netremotecall", this, "onResult", value);
+
+ if (this.dataobject!=null) {
+ if ( this.dataobject instanceof LzDataset ) {
+ //if ($debug) Debug.write("onResult:
",this,value,dataobject);
+ var element =
LzDataElement.valueToElement(value);
+ this.dataobject.setData(element.childNodes);
+ } else if ( this.dataobject instanceof LzDataElement ) {
+ var element =
LzDataElement.valueToElement(value);
+ this.dataobject.appendChild( element );
+ } else {
+ //if ($debug) Debug.warn("dataobject is not
LzDataset or LzDataElement: ",this,this.dataobject,delegate);
+ }
+ }
+ this.ondata.sendEvent(value);
+ ]]>
+ </method>
+</class>
+<!---
+ Net parameter.
+ Element to use inside netremotecall.
+ @todo Document netparam class.
+-->
+<class name="netparam" extends="node">
+ <!--- The value of the netparam. -->
+ <attribute name="value" value="null"/>
+</class>
</library>
Modified:
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
Wed Aug 17 07:35:54 2016
@@ -78,7 +78,6 @@ public class CoreScreenShare implements
public int defaultQuality = 1;
public int defaultFPS = 10;
public boolean showFPS = true;
- public boolean allowRemote = true;
private boolean allowRecording = true;
private boolean allowPublishing = true;
@@ -125,8 +124,7 @@ public class CoreScreenShare implements
defaultQuality = Integer.parseInt(args[3]);
defaultFPS = Integer.parseInt(args[4]);
showFPS = bool(args[5]);
- allowRemote = bool(args[6]);
- remoteEnabled = allowRemote;
+ remoteEnabled = bool(args[6]);
allowRecording = bool(args[7]);
allowPublishing = bool(args[8]);
@@ -146,13 +144,18 @@ public class CoreScreenShare implements
instance = new
RTMPScreenShare(this);
break;
case rtmpt:
- instance = new
RTMPTScreenShare(this);
+ instance = new
RTMPTScreenShare(this, false);
break;
case rtmps:
- RTMPSScreenShare client = new
RTMPSScreenShare(this);
- //NOT in use since 1.0.8-M3
client.setKeystoreBytes(Hex.decodeHex(args[9].toCharArray()));
-
client.setKeyStorePassword(args[10]);
- instance = client;
+ boolean nativeSsl =
bool(args[9]);
+ if (nativeSsl) {
+ RTMPSScreenShare client
= new RTMPSScreenShare(this);
+ //NOT in use since
1.0.8-M3 client.setKeystoreBytes(Hex.decodeHex(args[10].toCharArray()));
+
client.setKeyStorePassword(args[11]);
+ instance = client;
+ } else {
+ instance = new
RTMPTScreenShare(this, true);
+ }
break;
case rtmpe:
default:
Modified:
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
Wed Aug 17 07:35:54 2016
@@ -31,8 +31,11 @@ public class RTMPTScreenShare extends RT
private final CoreScreenShare core;
- public RTMPTScreenShare(CoreScreenShare core) {
+ public RTMPTScreenShare(CoreScreenShare core, boolean secure) {
this.core = core;
+ if (secure) {
+ protocol = "rtmps";
+ }
};
//
------------------------------------------------------------------------
Modified:
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/gui/ScreenSharerFrame.java
Wed Aug 17 07:35:54 2016
@@ -613,7 +613,7 @@ public class ScreenSharerFrame extends J
remoteEnabled.setBackground(Color.WHITE);
remoteEnabled.setSelected(core.isRemoteEnabled());
remoteEnabled.setBounds(10, 10, 450, 24);
- remoteEnabled.setEnabled(core.allowRemote);
+ remoteEnabled.setEnabled(core.isRemoteEnabled());
remoteEnabled.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Modified:
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp
Wed Aug 17 07:35:54 2016
@@ -46,6 +46,7 @@
<argument>$allowRemote</argument>
<argument>$allowRecording</argument>
<argument>$allowPublishing</argument>
+ <argument>$native</argument>
<argument>$keystore</argument>
<argument>$password</argument>
</application-desc>
Modified:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/StartSharingButton.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/StartSharingButton.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/StartSharingButton.java
(original)
+++
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/StartSharingButton.java
Wed Aug 17 07:35:54 2016
@@ -107,7 +107,7 @@ public class StartSharingButton extends
throw new
RuntimeException(String.format("Invalid room id passed %s, expected, %s", path,
roomId));
}
Protocol protocol = Protocol.valueOf(url.getScheme());
- app = addKeystore(app, protocol).replace("$codebase",
baseUrl + "screenshare")
+ app = addKeystore(rc, app,
protocol).replace("$codebase", baseUrl + "screenshare")
.replace("$applicationName",
cfgDao.getAppName())
.replace("$url", _url)
.replace("$publicSid", publicSid)
@@ -149,7 +149,7 @@ public class StartSharingButton extends
return result.toString();
}
- private static String addKeystore(String app, Protocol protocol) {
+ private static String addKeystore(Client rc, String app, Protocol
protocol) {
log.debug("RTMP Sharer Keystore :: start");
String keystore = "--dummy--", password = "--dummy--";
if (Protocol.rtmps == protocol) {
@@ -187,7 +187,8 @@ public class StartSharingButton extends
}
}
}
- return app.replace("$keystore", CDATA_BEGIN + keystore +
CDATA_END)
+ return app.replace("$native", "" + rc.isNativeSsl())
+ .replace("$keystore", CDATA_BEGIN + keystore +
CDATA_END)
.replace("$password", CDATA_BEGIN + password +
CDATA_END);
}
}
Modified:
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
(original)
+++
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
Wed Aug 17 07:35:54 2016
@@ -93,6 +93,7 @@ import org.springframework.beans.factory
public class ScopeApplicationAdapter extends ApplicationAdapter implements
IPendingServiceCallback {
private static final Logger log =
Red5LoggerFactory.getLogger(ScopeApplicationAdapter.class, webAppRootKey);
private static final String SECURITY_CODE_PARAM = "securityCode";
+ private static final String NATIVE_SSL_PARAM = "nativeSsl";
@Autowired
private ISessionManager sessionManager;
@@ -184,7 +185,7 @@ public class ScopeApplicationAdapter ext
String uid = (String)connParams.get("uid");
String securityCode =
(String)connParams.get(SECURITY_CODE_PARAM);
if (!Strings.isEmpty(securityCode)) {
- //FIXME TODO add better mechanism
+ //FIXME TODO add better mechanism, this is for external
applications like ffmpeg
Client parent =
sessionManager.getClientByPublicSID(securityCode, null);
if (parent == null ||
!parent.getScope().equals(conn.getScope().getName())) {
return rejectClient();
@@ -220,6 +221,7 @@ public class ScopeApplicationAdapter ext
rcm.setUserip(conn.getRemoteAddress());
rcm.setSwfurl(swfURL);
rcm.setTcUrl(tcUrl);
+
rcm.setNativeSsl(Boolean.TRUE.equals(connParams.get(NATIVE_SSL_PARAM)));
rcm.setPublicSID(uid);
rcm.setSecurityCode(securityCode);
rcm =
sessionManager.add(((IApplication)Application.get(OpenmeetingsVariables.wicketApplicationName)).updateClient(rcm),
null);
Modified:
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
(original)
+++
openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/room/Client.java
Wed Aug 17 07:35:54 2016
@@ -290,7 +290,10 @@ public class Client implements IDataProv
@Column(name = "tcurl", length=2048)
private String tcUrl;
-
+
+ @Column(name = "nativeSsl")
+ private boolean nativeSsl = false;
+
/**
* @see Client#getIsRecording()
*/
@@ -874,6 +877,14 @@ public class Client implements IDataProv
this.tcUrl = tcUrl;
}
+ public boolean isNativeSsl() {
+ return nativeSsl;
+ }
+
+ public void setNativeSsl(boolean nativeSsl) {
+ this.nativeSsl = nativeSsl;
+ }
+
@Override
public String toString() {
return "Client [streamid=" + streamid + ", publicSID=" +
publicSID + ", isScreenClient=" + screenClient
Modified:
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
(original)
+++
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java
Wed Aug 17 07:35:54 2016
@@ -78,7 +78,6 @@ public class CoreScreenShare implements
public int defaultQuality = 1;
public int defaultFPS = 10;
public boolean showFPS = true;
- public boolean allowRemote = true;
private boolean allowRecording = true;
private boolean allowPublishing = true;
@@ -125,8 +124,7 @@ public class CoreScreenShare implements
defaultQuality = Integer.parseInt(args[3]);
defaultFPS = Integer.parseInt(args[4]);
showFPS = bool(args[5]);
- allowRemote = bool(args[6]);
- remoteEnabled = allowRemote;
+ remoteEnabled = bool(args[6]);
allowRecording = bool(args[7]);
allowPublishing = bool(args[8]);
@@ -146,13 +144,18 @@ public class CoreScreenShare implements
instance = new
RTMPScreenShare(this);
break;
case rtmpt:
- instance = new
RTMPTScreenShare(this);
+ instance = new
RTMPTScreenShare(this, false);
break;
case rtmps:
- RTMPSScreenShare client = new
RTMPSScreenShare(this);
- //NOT in use since 1.0.8-M3
client.setKeystoreBytes(Hex.decodeHex(args[9].toCharArray()));
-
client.setKeyStorePassword(args[10]);
- instance = client;
+ boolean nativeSsl =
bool(args[9]);
+ if (nativeSsl) {
+ RTMPSScreenShare client
= new RTMPSScreenShare(this);
+ //NOT in use since
1.0.8-M3 client.setKeystoreBytes(Hex.decodeHex(args[10].toCharArray()));
+
client.setKeyStorePassword(args[11]);
+ instance = client;
+ } else {
+ instance = new
RTMPTScreenShare(this, true);
+ }
break;
case rtmpe:
default:
Modified:
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
URL:
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java?rev=1756586&r1=1756585&r2=1756586&view=diff
==============================================================================
---
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
(original)
+++
openmeetings/application/trunk/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java
Wed Aug 17 07:35:54 2016
@@ -31,8 +31,11 @@ public class RTMPTScreenShare extends RT
private final CoreScreenShare core;
- public RTMPTScreenShare(CoreScreenShare core) {
+ public RTMPTScreenShare(CoreScreenShare core, boolean secure) {
this.core = core;
+ if (secure) {
+ protocol = "rtmps";
+ }
};
//
------------------------------------------------------------------------