Real Time Collaboration 301

As promised, here is some example code showing how to hook up AutoVue's RTC into a portal. The example code here is stock HTML for the portal, plus a python CGI for the launcher - although the launcher is pretty easy, so you should be able to follow it even if you don't understand python.

The usage flow is this:


  1. The host opens the file they want to collaborate on in AutoVue and starts an RTC session manually
  2. The host opens the 'Session information' dialog, gets the session id and distributes it to the attendees - over the phone, over IM, email, etc. She also gives them the URL to the server to use - http://rtc.acme.com or something like that.
  3. The attendees go to the URL, and are prompted for their session ID and user name. They enter the information, and then the launcher CGI script will start AutoVue for them, and automatically connect them to the RTC session.

The login page can be pretty much anything, as long as it has the ability to launch actions. For this example, I'm just going to use stock HTML with a simple form:

<html>
<head>
<title>
Oracle AutoVue Web Conferencing</title>
<body>
<form id="joinMeeting" name="joinMeeting" style="margin: 0px;" 
         method="post" action="startrtc.py">
Conference ID: <input id="M__Id" class="xh" onkeypress="return
      _submitOnEnter(event, 'joinMeeting');" name="mID" size="11" 
      type="text"> <br>
Name: <input id="M__Idb" class="xh" name="displayName" 
     size="11" type="text"> <br>
<input type="submit" value="Join Conference" />
</form>
</body>

When the user clicks on 'Join Conference', it'll launch the 'startrtc.py' python script. This creates a block of HTML that will create the AutoVue applet, and register an initialization function called 'joinSession', so that once AutoVue has started up, it'll connect to the RTC Session

If you aren't already familiar with creating an AutoVue applet, I'd recommend that you look in the "Install and Administration" guide for AutoVue - it has more details on the various parameters and how to use them - you will need to fix the classpath and the JVUESERVER url if you want to get this working.

This is a lot more technical than most of our posts - was it useful to you? If you'd like to see more technical content like this, let us know in the comments

Here's the python script to launch AutoVue :

#!/usr/bin/python

import cgi;
import cgitb; cgitb.enable()

print "Content-Type: text/html"
print ""

form = cgi.FieldStorage()


# parameters:
#   mID = The meeting (session) ID to use
#   displayName => the username to show, optional - 
#   if not specified, the user name is used

if form.has_key("mID"):
    mID = form.getfirst("mID")
else:
    mID = 'unknown'

if form.has_key("displayName"):
    displayName = """<param name="USERNAME" value="%s"/>""" % \
(form.getfirst("displayName"))
else:
    displayName = ""


#arguments:
#  1:  Meeting/Session ID
#  2:  html fragment for setting applet USERNAME param 
# (or empty string for default username)

str = """
<html>
  <head runat="server">
  <title>Oracle AutoVue Enterprise Visualization</title>
  </head>
<script type="text/javascript">

function joinSession() {
  var myApp = window.document.applets["JVue"];
  var sessIDClass = myApp.getClass("com.cimmetry.core.CollaborationSessionID");
  var sessID = sessIDClass.newInstance();
  sessID.setSessionID(%s);
  myApp.getActiveVueBean().getCollaborationBean().joinSession(sessID,null,false,0);

}
</script>

<body>
<p>

                    <applet name="JVue" code="com.cimmetry.jvue.JVue.class"
                               codebase="/jvue/"
                        archive="jvue.jar,jogl.jar,gluegen-rt.jar" hspace="0" 
                                 vspace="0" width="100%%"
                        height="100%%" mayscript>
                        
                        <param name="EMBEDDED" value="true" />
                        <param name="VERBOSE" value="true" />
                        <param name="ONINIT" value="joinSession();" />

                        %s                        
                        
			<PARAM NAME="JVUESERVER" 
                        VALUE="http://my_autovue_server:5098/servlet/VueServlet">
                    </applet>
</body>
</html>
"""
    
print str % (mID, displayName)
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

The authors of this blog are members of the AutoVue Enterprise Visualization team at Oracle. The views expressed on this blog reflect those of the members and do not necessarily reflect the views of Oracle.

Search

Archives
« March 2015
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today