Have a web site that you want to embed video into with just a few lines of JavaScript?
HTML
Switch branches/tags
Nothing to show
Clone or download
Latest commit c3f5d82 May 18, 2017
Permalink
Failed to load latest commit information.
README.md New May 18, 2017
sample.html Sample May 18, 2017

README.md

embed

Blue Jeans offers an easy to use script library for inclusion on your page in order to instantiate the meeting room. A simple JavaScript object called BJN_CLIENT is setup in advance of the script include to setup the meeting.

Variables

This table presents a list of various properties that can be set on the BJN_CLIENT object before including embed.js.

NameRequiredTypeDescriptionM
contentNoStringID of HTML DOM element in which to create the meeting. If not provided, the content is added inline with a document.writeln.
meetingIdYesStringBlue Jeans meeting ID
pinNoStringModerator pin or attendee pin for the meeting. If no pin, then do not include property.
nameNoStringName of the user joining. If not provided, user will be prompted.
emailNoStringEmail address of the user joining.
widthNoStringUsed to define the width of the IFRAME for the meeting. Treated as a string so % can be used. Default is 100%.
heightNoStringUsed to define the height of the IFRAME for the meeting. Treated as a string so % can be used. Default is 600 pixels.
onJoinNoFunctionProvide a function that will be called upon launch of the meeting.

This table presents a list of various properties that are set on BJN_CLIENT for you. They are normally to be read in cases where you might need to inspect the setup.

NameTypeDescription
versionIntegerA version number for the embed.js script. This may help in backwards-compatability in the future.
protocolStringSet to "http:" or "https:" based on where embed.js was loaded from.
hostnameStringThe hostname that embed.js was loaded from.

Script Tag

It is helpful to place an HTML ID on the script include named "bjn-embed". This is used by the embed.js to detect the hostname used for situations where your implementation is running on different Blue Jeans partitions (production, beta, etc).

Query Parameters

When launching a Blue Jeans meeting, there are various parameters that can be set to customize the experience. The embed.js script will setup a variety of these parameters in according to values set on the BJN_CLIENT object. If you are using the embed.js option, these query parameters are not used directly as embed.js will handle them for you. However, some implementations may need further customizations so this is provided a reference.

NameTypeDescription
embedBooleanTrue signals Blue Jeans to use the embedded user interface, which removes branded headers and footers from the page.
fullscreenBooleanTrue signals the meeting client to utilize the full width and height that is has been allocated in its parent window/frame.
nameStringThe name of the user joining the meeting.
emailStringThe email address of the user joining the meeting.

Defer

Depending on your use case, you may not want the <script> tag to automatically start your meeting. One such situation is when you have a list of meeting and you may want a user to choose one before proceeding. In this case, you may use a special query parameter to the script called "defer". This will keep the <script> from starting the meeting.

<script id="bjn-embed" src="http://bluejeans.com/static/js/embed.js?defer=true"></script>

After using the defer tag, you will need to start the meeting when ready. To do that, you can call functions that have been added to BJN_CLIENT:

NameArgumentsDescription
launch()callback functionLaunches the meeting in a new tab with id "bluejeans". This is an option if you do not want to embed the meeting into your page, but a separate window.
load()callback functionLaunches the meeting inside your prescribed content area configured in BJN_CLIENT.

Sample

A sample implementation demonstrating the pieces working together.

<html>
        <body>
                <h1>embed.js Demo</h1>
                <div id="myclient"></div>
                <script type="text/javascript">
                        var BJN_CLIENT =
                        {
                                content: 'myclient',
                                meetingId: '8336872800',
                                pin: '4267',
                                name: 'Steve Jobs',
                                email: 'steve@apple.com'
                        };
                </script>
                <script id="bjn-embed" src="http://bluejeans.com/static/js/embed.js"></script>
        </body>
</html>