Meet (embed)

A whole meeting, inside your page.

This page covers loading the Meet SDK, joining a meeting from your own page, the options and events it offers, and what your page has to allow.

01

Embed a meeting

Create the meeting in Meet or in the console and take its code (abc-defg-hij). Then give the SDK an element to fill:

Join from your own page
<div id="call" style="height:640px"></div>
<script src="https://meet.yunzheng.space/v1.js"></script>
<script>
  var call = OrbitMeet.join({
    code: "abc-defg-hij",
    name: "Ada",
    el: "#call",
    onJoined: function (d) { console.log("in the meeting as " + d.role); },
    onLeave: function () { console.log("the call is over"); },
    onError: function (e) { console.error(e.code || "meet", e.message); }
  });
  // later: call.leave();
</script>

The meeting runs in one frame inside that element: waiting room, screen sharing, captions and host controls are all there. Your page receives events and nothing else — never the meeting's media or its credentials.

Every embedded visitor joins as a guest, under the meeting's own waiting room, passcode and guest rules. The SDK also accepts a token option for a seat your server would issue; the platform does not issue those yet, so leave it out.
02

Options

OptionWhat it sets
codeRequired. The meeting code, with or without dashes, or any meeting link that carries one.
elWhere the meeting goes: an element or a selector. Defaults to document.body.
nameThe name the meeting shows for this person, up to 40 characters. Without it the guest is asked.
langen or zh.
width, heightCSS sizes of the frame. By default it fills the element and is at least 420px tall.
titleThe frame's accessible title. Defaults to Orbit Meet.
onReady, onJoined, onLeave, onErrorThe four events, passed inline. The same as calling on(...) afterwards.

OrbitMeet.join returns an object with on(event, fn), off(event, fn), leave() (removes the frame), frame() (the iframe, or null after leaving), code and version.

03

Events

EventInlineWhenDetail
readyonReadyThe meeting page has loaded in the frame.{ code }
joinedonJoinedThe person is in the call, past the waiting room if there is one.{ session, role }
leftonLeaveThey left, were removed, or the meeting ended. The SDK removes the frame.{ session }
erroronErrorSomething stopped the join.{ code, message } or { message }
04

Handling errors

Errors are reported, never thrown: a wrong code in your page's content puts a message in your handler instead of stopping your page's script. A code that is not a meeting code is reported as bad-code without loading anything. Everything the meeting itself refuses — the meeting has ended, the passcode is wrong, the room is full — arrives with a message written for a person, which you can show as it is.

Pass onError inline rather than adding it later with on: a bad code is reported on the next tick, and the inline handler is already in place to receive it.

05

What your page must allow

The SDK creates the frame with allow="camera; microphone; display-capture; fullscreen; autoplay". Browsers deny all of these to a frame from another site unless the attribute says so, which is why a call in a hand-made iframe without it shows a black tile and no error. If you build the iframe yourself, copy that attribute.

If your page sends a Content-Security-Policy, allow https://meet.yunzheng.space in both script-src (for the SDK) and frame-src (for the meeting). A Permissions-Policy header on your page, if you send one, must not switch camera or microphone off for that origin.

06

Links instead of an embed

  • OrbitMeet.link(code) returns the meeting's own address, for a button that opens the meeting in a new tab.
  • OrbitMeet.code(input) turns what a person typed or pasted into a meeting code, or an empty string if it is not one.
Next

Related

Getting started

How an Orbit account is organised, what lives where in the console, and the shortest path from signing in to serving a name from our network.

DNS hosting

Add a zone, point your registrar at our name servers, manage records: weighted answers, health-checked records, ALIAS at the apex, zone-file import.

Connect a hostname

Delegate the whole domain, delegate one hostname, or add a CNAME and leave your DNS where it is. What each one costs you and when to pick it.

← All documentation