@councilbox/shutter-js

    1.2.1 • Public • Published

    SHUTTER JS SDK

    License Version NPM

    A javascript sdk for Shutter built with webpack, babel & es6. This can be used in node or in the browser*.

    NOTE: If used in the browser do not publish your private api key in frontend code.

    Install

    • Requires node.js >= 14.x
    npm i @councilbox/shutter-js

    Setup Client

    Next, require the module and instantiate a shutter client by calling new Shutter and setup the client with basic auth credentials (email: 'example@mail.com', password: 'your_pass_here'). Also need an api url provided by shutter team.

    import Shutter from '@councilbox/shutter-js';
    
    const shutter = new Shutter({
      email: "example@mail.com",
      password: "your_pass_here",
      uri: "example.shutter.com"
    });

    Methods

    The following service methods are available to instantiated clients. The examples assume you have already created a shutter client as shutter with valid credentials.

    Method naming conventions:

    • get or get{{Item}} - expected response for client is a single object
    • list or list{{Items}} - expected response for client is a list of objects
    • create or create{{Item}} - expected response for client is a single object
    • update or update{{Item}} - expected response is an object with a status message
    • delete or delete{{Item}} - expected response is an object with a status message

    users

    me

    shutter.users.me()

    Example:

    try {
      const me = await shutter.users.me();
      console.log(me) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109bec0f8aaef2395f481059',
      name: 'Example',
      surname: 'test',
      email: 'example@shutter.com',
      type: 'ACCOUNT',
      organizations: [
        {
          id: '109bec1d8aaef2395f48105c',
          name: 'Test Org',
          logo: <logo_url>,
          created: '1620831261329'
        }
      ],
      language: 'en',
      state: 'UNCONFIRMED',
      created: '1620831247972'
    }
    

    create

    shutter.users.create({ user })

    Example:

    try {
      const createdUser = await shutter.users.create({
     user: {
      name: "test",
      email: "test@shutter.com"
     }
      });
      console.log(createdUser) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '609ab5190ae391f4e90d10f1',
      name: 'test',
      email: "test@shutter.com"
    }

    Options:

    Parameter Description
    name Name of the user.
    email Email address of the user. Example: "Jhon jhon@host.com".

    delete

    shutter.users.delete({ id })

    Example:

    try {
      const deletedUser = await shutter.users.delete({ id: "109e4d75ec5805340e6ccaf7" });
      console.log(deletedUser) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e4d75ec5805340e6ccaf7',
      name: 'Test',
      surname: 'User',
      email: 'test@shutter.com',
      type: 'BASIC',
      language: 'en',
      state: 'UNCONFIRMED',
      created: '1620987253103',
      organizations: []
    }
    

    Options:

    Parameter Description
    id User ID.

    organizations

    list

    shutter.organizations.list()

    Example:

    try {
      const organizations = await shutter.organizations.list();
      console.log(organizations) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    [
      {
        id: '109bec1d8aaef2395f48105c',
        name: 'Test Org 1',
        logo: <logo_url>,
        created: '1620831261329',
        owner: {
          id: '109bec0f8aaef2395f481059',
          name: 'Test',
          surname: 'SHUTTER',
          email: 'test@shutter.com',
          language: 'en',
          created: '1620831247972'
        }
      },
      ...
    ]

    create

    shutter.organizations.create({ organization })

    Example:

    try {
      const organization = await shutter.organizations.create({
       organization: {
        name: `Test Org`,
        logo: {
          filetype: 'png',
          base64: 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAEySURBVDiNhdJPK0VhEMfxz3UlsmDBQkn+lPxZKJYsRCErO2WpvAXvwXuwJaykJGWHYmFhgZ2UUjZYyC0RizM3zz0d3alper7PzO/Mc2ZKim0ZvTn2gN18Yumfwn7c5+6qrEaoMZc0jDNcFXRVZVMpzAvAEMZwjdFgNwmrsYYCgQ6sRXwOT1ldgSvsROwOT1ldgQlsRmwKT1ldgbtIvMNbeMpqrOgn9qFdNuKRYE8JqysAr5FcKWA1VsIMFuJcwa1smR4wGfw8YSNoidqjMlaxh/cQ+sKl7M1daI5Oq2wcBzjFYhnTmI83fmJLtm2H+MEjThI2iE7M4qUU7WxjI3nKWRQsxXk/YXCMdaw0xJe7cRGX6chew/NjHJCtdaWMObTK9r4n2hbCbfjwN432yPmO2PQLRLdIycezsR4AAAAASUVORK5CYII='
        }
       }
      });
      console.log(organization) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e4d71ec5805340e6ccaf3',
      name: 'Test Org',
      logo: <logo_url>
    }

    Options:

    Parameter Description
    name Name of the organization.
    logo Need two fields: filetype -> file type (png, jpeg, gif...); base64 -> file base64 encoded string.

    update

    shutter.organizations.update({ organization })

    Example:

    try {
      const updatedOrganization = await shutter.organizations.update({
        organization: {
          id: '109e4d71ec5805340e6ccaf3',
          name: `Test Org Updated`,
          logo: {
            filetype: 'png',
            base64: 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAEySURBVDiNhdJPK0VhEMfxz3UlsmDBQkn+lPxZKJYsRCErO2WpvAXvwXuwJaykJGWHYmFhgZ2UUjZYyC0RizM3zz0d3alper7PzO/Mc2ZKim0ZvTn2gN18Yumfwn7c5+6qrEaoMZc0jDNcFXRVZVMpzAvAEMZwjdFgNwmrsYYCgQ6sRXwOT1ldgSvsROwOT1ldgQlsRmwKT1ldgbtIvMNbeMpqrOgn9qFdNuKRYE8JqysAr5FcKWA1VsIMFuJcwa1smR4wGfw8YSNoidqjMlaxh/cQ+sKl7M1daI5Oq2wcBzjFYhnTmI83fmJLtm2H+MEjThI2iE7M4qUU7WxjI3nKWRQsxXk/YXCMdaw0xJe7cRGX6chew/NjHJCtdaWMObTK9r4n2hbCbfjwN432yPmO2PQLRLdIycezsR4AAAAASUVORK5CYII='
          }
        }
      });
      console.log(updatedOrganization) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e4d71ec5805340e6ccaf3',
      name: 'Test Org Updated',
      logo: <logo_url>
    }

    Options:

    Parameter Description
    id Organization ID. (required).
    name Name of the organization.
    logo Need two fields: filetype -> file type (png, jpeg, gif...); base64 -> file base64 encoded string.

    delete

    shutter.organizations.delete({ id })

    Example:

    try {
      const deletedOrganization = await shutter.organizations.delete({ id: "109e4d71ec5805340e6ccaf3" });
      console.log(deletedOrganization) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e4d71ec5805340e6ccaf3',
      name: 'Test Org',
      logo: <logo_url>
    }

    Options:

    Parameter Description
    id Organization ID.

    rooms

    list

    shutter.rooms.list()

    Example:

    try {
      const rooms = await shutter.rooms.list();
      console.log(rooms) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    [
      {
        roomNumber: '109e5704fd41a639344b9432',
        userID: '109bec0f8aaef2395f481059',
        organizationID: '109e5700fd41a639344b942c',
        type: 'MEET',
        created: '1620989700405',
        displayName: 'Meeting',
        externalID: 'test_1',
        agenda: 'Meeting agenda',
    	urlExternalLiveStreaming: '',
    	canExternalLiveStreaming: false,
    	autoExternalLiveStreaming: false,
    	externalLiveStreaming: false,
        locked: false,
        enabledWaitingRoom: false,
        webhook: null,
        data: '',
        attendees: [
      {
       id: '109e5705fd41a639344b943a',
       role: 'SPEAKER',
       canShareScreen: true,
       canBroadcast: true,
       broadcasting: false,
       canChat: true,
       canMuteAudio: true,
       canMuteVideo: true,
       canMuteAudioAll: true,
       canMuteVideoAll: true,
       canShareFiles: false,
       canSeeAttendeesList: true,
       canRaiseHand: true,
       mutedMic: false,
       mutedCam: false,
       displayName: 'Speaker Test',
       language: 'en',
       data: null
      },
      ...
     ],
        url: null,
        canRecord: false,
        autoRecord: false,
        recording: false,
        state: 'DRAFT',
        deletedAt: null
      },
      ...
    ]

    get

    shutter.rooms.get({ roomNumber })

    Example:

    try {
      const room = await shutter.rooms.get({ roomNumber: room.roomNumber });
      console.log(room) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      roomNumber: '109e5704fd41a639344b9432',
        userID: '109bec0f8aaef2395f481059',
        organizationID: '109e5700fd41a639344b942c',
        type: 'MEET',
        created: '1620989700405',
        displayName: 'Meeting',
        externalID: 'test_1',
        agenda: 'Meeting agenda',
        urlExternalLiveStreaming: '',
    	canExternalLiveStreaming: false,
    	autoExternalLiveStreaming: false,
    	externalLiveStreaming: false,
        locked: false,
        enabledWaitingRoom: false,
        webhook: null,
        data: '',
        attendees: [
      {
       id: '109e5705fd41a639344b943a',
       role: 'SPEAKER',
       canShareScreen: true,
       canBroadcast: true,
       broadcasting: false,
       canChat: true,
       canMuteAudio: true,
       canMuteVideo: true,
       canMuteAudioAll: true,
       canMuteVideoAll: true,
       canShareFiles: false,
       canSeeAttendeesList: true,
       canRaiseHand: true,
       mutedMic: false,
       mutedCam: false,
       displayName: 'Speaker Test',
       language: 'en',
       data: null
      },
      ...
     ],
        url: null,
        canRecord: false,
        autoRecord: false,
        recording: false,
        state: 'DRAFT',
        deletedAt: null
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.

    create

    shutter.rooms.create({ room, organizationID })

    Example:

    try {
      const room = await shutter.rooms.create({
       room: {
      type: 'MEET',
      displayName: `Meeting test`,
      externalID: 'test_2',
      agenda: 'Meeting agenda',
      urlExternalLiveStreaming: '',
      canExternalLiveStreaming: false,
      autoExternalLiveStreaming: false,
      externalLiveStreaming: false,
      locked: false,
      enabledWaitingRoom: false,
      webhook: null,
      data: '',
      attendees: [
       {
        email: 'moderator@shutter.com',
        role: 'MODERATOR',
        canShareScreen: true,
        canBroadcast: true,
        canChat: true,
        canMuteAudio: true,
        canMuteVideo: true,
        canMuteAudioAll: true,
        canMuteVideoAll: true,
        canShareFiles: true,
        canSeeAttendeesList: true,
        canRaiseHand: true,
        broadcasting: true,
        mutedMic: false,
        mutedCam: false,
        displayName: 'Moderador',
        language: 'es'
       }
      ],
      password: 'abc12345',
      canRecord: false,
      autoRecord: false,
      security: 'PRIVATE',
      state: 'DRAFT'
       },
       organizationID: "109e5700fd41a639344b942c"
      });
      console.log(room) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      userID: '109bec0f8aaef2395f481059',
      organizationID: '109e5700fd41a639344b942c',
      type: 'MEET',
      created: '1620989700405',
      displayName: 'Meeting test',
      externalID: 'test_2',
      agenda: 'Meeting agenda',
      presenterID: null,
      urlExternalLiveStreaming: '',
      canExternalLiveStreaming: false,
      autoExternalLiveStreaming: false,
      externalLiveStreaming: false,
      locked: false,
      enabledWaitingRoom: false,
      webhook: null,
      data: '',
      attendees: [
        {
          id: '109e5704fd41a639344b9433',
          externalID: null,
          role: 'MODERATOR',
          canShareScreen: true,
          canBroadcast: true,
          canChat: true,
          canMuteAudio: true,
          canMuteVideo: true,
          canMuteAudioAll: true,
          canMuteVideoAll: true,
          canShareFiles: true,
          canSeeAttendeesList: true,
          canRaiseHand: true,
          broadcasting: true,
          mutedMic: false,
          mutedCam: false,
          displayName: 'Moderador',
          language: 'es',
          online: false,
          data: null
        }
      ],
      url: null,
      canRecord: false,
      autoRecord: false,
      recording: false,
      state: 'DRAFT',
      roomNumber: '109e5704fd41a639344b9432'
    }

    Options:

    Parameter Description
    room Room object
    organizationID Organization ID that room belongs to.

    update

    shutter.rooms.update({ room, organizationID })

    Example:

    try {
      const updatedRoom = await shutter.rooms.update({
       room: {
      roomNumber: '109e5704fd41a639344b9432',
      type: 'MEET',
      displayName: `Meeting test Updated`,
      externalID: 'test_2',
      agenda: 'Meeting agenda',
      urlExternalLiveStreaming: '',
      canExternalLiveStreaming: false,
      autoExternalLiveStreaming: false,
      externalLiveStreaming: false,
      locked: false,
      enabledWaitingRoom: false,
      webhook: null,
      data: '',
      attendees: [
       {
        email: 'moderator@shutter.com',
        role: 'MODERATOR',
        canShareScreen: true,
        canBroadcast: true,
        canChat: true,
        canMuteAudio: true,
        canMuteVideo: true,
        canMuteAudioAll: true,
        canMuteVideoAll: true,
        canShareFiles: true,
        canSeeAttendeesList: true,
        canRaiseHand: true,
        broadcasting: true,
        mutedMic: false,
        mutedCam: false,
        displayName: 'Moderador',
        language: 'es'
       }
      ],
      password: 'abc12345',
      canRecord: false,
      autoRecord: false,
      security: 'PRIVATE',
      state: 'DRAFT'
       },
       organizationID: "109e5700fd41a639344b942c"
      console.log(updatedRoom) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
     roomNumber: '109e5704fd41a639344b9432',
     type: 'MEET',
     displayName: `Meeting test Updated`,
     externalID: 'test_2',
     agenda: 'Meeting agenda',
     urlExternalLiveStreaming: '',
     canExternalLiveStreaming: false,
     autoExternalLiveStreaming: false,
     externalLiveStreaming: false,
     locked: false,
     enabledWaitingRoom: false,
     webhook: null,
     data: '',
     attendees: [
      {
       email: 'moderator@shutter.com',
       role: 'MODERATOR',
       canShareScreen: true,
       canBroadcast: true,
       canChat: true,
       canMuteAudio: true,
       canMuteVideo: true,
       canMuteAudioAll: true,
       canMuteVideoAll: true,
       canShareFiles: true,
       canSeeAttendeesList: true,
       canRaiseHand: true,
       broadcasting: true,
       mutedMic: false,
       mutedCam: false,
       displayName: 'Moderador',
       language: 'es'
      }
     ],
     password: 'abc12345',
     canRecord: false,
     autoRecord: false,
     security: 'PRIVATE',
     state: 'DRAFT'
    }

    Options:

    Parameter Description
    room Room object
    organizationID Organization ID that room belongs to.

    delete

    shutter.rooms.delete({ roomNumber })

    Example:

    try {
      const deletedRoom = await shutter.rooms.delete({ roomNumber: "109e5704fd41a639344b9432" });
      console.log(deletedRoom) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      userID: '109bec0f8aaef2395f481059',
      organizationID: '109e5700fd41a639344b942c',
      type: 'MEET',
      displayName: 'Meeting test Updated',
      urlExternalLiveStreaming: '',
      canExternalLiveStreaming: false,
      autoExternalLiveStreaming: false,
      externalLiveStreaming: false,
      canRecord: false,
      autoRecord: false,
      recording: false,
      deletedAt: '1620989709156'
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.

    start

    shutter.rooms.start({ roomNumber })

    Example:

    try {
      const startedRoom = await shutter.rooms.start({ roomNumber: "109e5704fd41a639344b9432" });
      console.log(startedRoom) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      userID: '109bec0f8aaef2395f481059',
      organizationID: '109e5700fd41a639344b942c',
      type: 'MEET',
      displayName: 'Meeting test Updated',
      urlExternalLiveStreaming: '',
      canExternalLiveStreaming: false,
      autoExternalLiveStreaming: false,
      externalLiveStreaming: false,
      canRecord: false,
      autoRecord: false,
      recording: false,
      state: 'STARTED'
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.

    close

    shutter.rooms.close({ roomNumber })

    Example:

    try {
      const closedRoom = await shutter.rooms.close({ roomNumber: "109e5704fd41a639344b9432" });
      console.log(closedRoom) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      userID: '109bec0f8aaef2395f481059',
      organizationID: '109e5700fd41a639344b942c',
      type: 'MEET',
      displayName: 'Meeting test Updated',
      urlExternalLiveStreaming: '',
      canExternalLiveStreaming: false,
      autoExternalLiveStreaming: false,
      externalLiveStreaming: false,
      canRecord: false,
      autoRecord: false,
      recording: false,
      state: 'FINISHED'
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.

    startRecording

    shutter.rooms.startRecording({ roomNumber })

    Example:

    try {
      const recordingStarted = await shutter.rooms.startRecording({ roomNumber: "109e5704fd41a639344b9432" });
      console.log(recordingStarted) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      userID: '109bec0f8aaef2395f481059',
      organizationID: '109e5700fd41a639344b942c',
      type: 'MEET',
      displayName: 'Meeting test Updated',
      urlExternalLiveStreaming: '',
      canExternalLiveStreaming: false,
      autoExternalLiveStreaming: false,
      externalLiveStreaming: false,
      canRecord: true,
      autoRecord: false,
      recording: true
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.

    stopRecording

    shutter.rooms.stopRecording({ roomNumber })

    Example:

    try {
      const recordingStopped = await shutter.rooms.stopRecording({ roomNumber: "109e5704fd41a639344b9432" });
      console.log(recordingStopped) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      userID: '109bec0f8aaef2395f481059',
      organizationID: '109e5700fd41a639344b942c',
      type: 'MEET',
      displayName: 'Meeting test Updated',
      urlExternalLiveStreaming: '',
      canExternalLiveStreaming: false,
      autoExternalLiveStreaming: false,
      externalLiveStreaming: false,
      canRecord: true,
      autoRecord: false,
      recording: false
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.

    startMassiveStreaming

    shutter.rooms.startMassiveStreaming({ roomNumber })

    Example:

    try {
      const massiveStreamingStarted = await shutter.rooms.startMassiveStreaming({ roomNumber: "109e5704fd41a639344b9432" });
      console.log(massiveStreamingStarted) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      userID: '109bec0f8aaef2395f481059',
      organizationID: '109e5700fd41a639344b942c',
      type: 'MEET',
      displayName: 'Meeting test Updated',
      massive: true,
      massiveStreaming: true,
      canRecord: true,
      autoRecord: false,
      recording: false
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.

    stopMassiveStreaming

    shutter.rooms.stopMassiveStreaming({ roomNumber })

    Example:

    try {
      const massiveStreamingStopped = await shutter.rooms.stopMassiveStreaming({ roomNumber: "109e5704fd41a639344b9432" });
      console.log(massiveStreamingStopped) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      userID: '109bec0f8aaef2395f481059',
      organizationID: '109e5700fd41a639344b942c',
      type: 'MEET',
      displayName: 'Meeting test Updated',
      massive: true,
      massiveStreaming: true,
      canRecord: true,
      autoRecord: false,
      recording: false
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.

    attendeesUrls

    shutter.rooms.attendeesUrls({ roomNumber })

    Example:

    try {
      const attendeesUrls = await shutter.rooms.attendeesUrls({ roomNumber: "109e5704fd41a639344b9432" });
      console.log(attendeesUrls) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    [
      {
        attendee: {
          id: '109e5705fd41a639344b9436',
          role: 'MODERATOR',
          canShareScreen: true,
          canBroadcast: true,
          broadcasting: true,
          canChat: true,
          canMuteAudio: true,
          canMuteVideo: true,
          canMuteAudioAll: true,
          canMuteVideoAll: true,
          canShareFiles: true,
          canSeeAttendeesList: true,
          canRaiseHand: true,
          mutedMic: false,
          mutedCam: false,
          displayName: 'Moderador',
          language: 'es',
          data: null
        },
        url: <room_access_url>
      },
      ...
    ]

    Options:

    Parameter Description
    roomNumber Room number or ID.

    attendees

    list

    shutter.attendees.list({ roomNumber })

    Example:

    try {
      const attendees = await shutter.attendees.list({ roomNumber: '109e5704fd41a639344b9432' });
      console.log(attendees) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    [
       {
      id: '109e5705fd41a639344b943a',
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      broadcasting: false,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test',
      language: 'en',
      data: null
     },
     ...
    ]

    Options:

    Parameter Description
    roomNumber Room number or ID.

    get

    shutter.attendees.get({ roomNumber, id })

    Example:

    try {
      const attendee = await shutter.attendees.get({ roomNumber: '109e5704fd41a639344b9432', id: '109e5705fd41a639344b943a' });
      console.log(attendee) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e5705fd41a639344b943a',
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      broadcasting: false,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test',
      language: 'en',
      data: null
     }

    Options:

    Parameter Description
    roomNumber Room number or ID.
    id Attendee ID

    get URL

    shutter.attendees.getURL({ roomNumber, id })

    Example:

    try {
      const attendeeURL = await shutter.attendees.getURL({ roomNumber: '109e5704fd41a639344b9432', id: '109e5705fd41a639344b943a' });
      console.log(attendeeURL) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    https://<shutter_domain>/room/<token>
    

    Options:

    Parameter Description
    roomNumber Room number or ID.
    id Attendee ID

    create

    shutter.attendees.create({ roomNumber: room.roomNumber, attendee: newAttendee })

    Example:

    try {
      const createdAttendee = await shutter.attendees.create({
       roomNumber: "109e5704fd41a639344b9432"
       attendee: {
      email: 'speaker2@shutter.com',
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      broadcasting: true,
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test 2',
      language: 'en'
       }
      });
      console.log(createdAttendee) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e5705fd41a639344b943a',
      externalID: null,
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      broadcasting: true,
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test 2',
      email: 'speaker2@shutter.com'
      language: 'en',
      data: null
    }

    Options:

    Parameter Description
    roomNumber Room ID that attendee belongs to.
    attendee Attendee object

    update

    shutter.attendees.update({ roomNumber: room.roomNumber, attendee: newAttendee })

    Example:

    try {
      const updatedAttendee = await shutter.attendees.update({
       roomNumber: "109e5704fd41a639344b9432"
       attendee: {
      id: '109e5705fd41a639344b943a',
      email: 'speaker2@shutter.com',
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      broadcasting: true,
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test 2 Updated',
      language: 'en'
       }
      });
      console.log(updatedAttendee) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e5705fd41a639344b943a',
      externalID: null,
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      broadcasting: true,
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test 2 Updated',
      email: 'speaker2@shutter.com'
      language: 'en',
      data: null
    }

    Options:

    Parameter Description
    roomNumber Room ID that attendee belongs to.
    attendee Attendee object

    delete

    shutter.attendees.delete({ roomNumber, id })

    Example:

    try {
      const deletedAttendee = await shutter.attendees.delete({ roomNumber: '109e5704fd41a639344b9432', id: '109e5705fd41a639344b943a' });
      console.log(deletedAttendee) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e5705fd41a639344b943a',
      externalID: null,
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      broadcasting: true,
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test 2 Updated',
      email: 'speaker2@shutter.com'
      language: 'en',
      data: null
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.
    id Attendee ID

    raiseHand

    shutter.attendees.raiseHand({ roomNumber, id })

    Example:

    try {
      const raisedHandAttendee = await shutter.attendees.raiseHand({ roomNumber: '109e5704fd41a639344b9432', id: '109e5705fd41a639344b943a' });
      console.log(raisedHandAttendee) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e5705fd41a639344b943a',
      externalID: null,
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      raisedHand: true, // <--
      broadcasting: false,
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test',
      language: 'en',
      online: false,
      data: null
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.
    id Attendee ID

    lowerHand

    shutter.attendees.lowerHand({ roomNumber, id })

    Example:

    try {
      const loweredHandAttendee = await shutter.attendees.lowerHand({ roomNumber: '109e5704fd41a639344b9432', id: '109e5705fd41a639344b943a' });
      console.log(loweredHandAttendee) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e5705fd41a639344b943a',
      externalID: null,
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      raisedHand: false, // <--
      broadcasting: false, // <-- Put to false also.
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test',
      language: 'en',
      online: false,
      data: null
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.
    id Attendee ID

    grantWord

    shutter.attendees.grantWord({ roomNumber, id })

    Example:

    try {
      const grantedWordAttendee = await shutter.attendees.grantWord({ roomNumber: '109e5704fd41a639344b9432', id: '109e5705fd41a639344b943a' });
      console.log(grantedWordAttendee) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e5705fd41a639344b943a',
      externalID: null,
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      raisedHand: true,
      broadcasting: true, // <--
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test',
      language: 'en',
      online: false,
      data: null
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.
    id Attendee ID

    denyWord

    shutter.attendees.denyWord({ roomNumber, id })

    Example:

    try {
      const deniedWordAttendee = await shutter.attendees.denyWord({ roomNumber: '109e5704fd41a639344b9432', id: '109e5705fd41a639344b943a' });
      console.log(deniedWordAttendee) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    {
      id: '109e5705fd41a639344b943a',
      externalID: null,
      role: 'SPEAKER',
      canShareScreen: true,
      canBroadcast: true,
      canChat: true,
      canMuteAudio: true,
      canMuteVideo: true,
      canMuteAudioAll: true,
      canMuteVideoAll: true,
      canShareFiles: false,
      canSeeAttendeesList: true,
      canRaiseHand: true,
      raisedHand: false, // <-- Put to false also.
      broadcasting: false, // <--
      mutedMic: false,
      mutedCam: false,
      displayName: 'Speaker Test',
      language: 'en',
      online: false,
      data: null
    }

    Options:

    Parameter Description
    roomNumber Room number or ID.
    id Attendee ID

    recordings

    list

    shutter.recordings.list({ roomNumber })

    Example:

    try {
      const recordings = await shutter.recordings.list({ roomNumber: '109e5704fd41a639344b9432' });
      console.log(recordings) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    [
      {
        name: '60b89e4bf36ed0194f4189ca',
        mixed: false,
        mixProgress: 0,
        uploaded: false,
        uploadProgress: 0,
        duration: 0,
        size: 0,
        creationDate: '1622711886052',
        finishDate: null,
        posterUrl: 'https://<shutter_domain>/recordings/poster?roomNumber=109e5704fd41a639344b9432&name=60b89e4bf36ed0194f4189ca&authorization=<token>',
        downloadUrl: 'https://<shutter_domain>/recordings/get?roomNumber=109e5704fd41a639344b9432&name=60b89e4bf36ed0194f4189ca&authorization=<token>',
        streamingUrl: 'https://<shutter_domain>/recordings/streaming?roomNumber=109e5704fd41a639344b9432&name=60b89e4bf36ed0194f4189ca&authorization=<token>'
      },
      ...
    ]

    Options:

    Parameter Description
    roomNumber Room number or ID.

    getIframeUrl

    shutter.recordings.getIframeUrl({ roomNumber })

    Example:

    try {
      const recordingsIframeUrl = await shutter.recordings.getIframeUrl({ roomNumber: '109e5704fd41a639344b9432' });
      console.log(recordingsIframeUrl) // logs response data
    } catch (err) {
      console.log(err); // logs any error
    }

    Promise Returns:

    https://<shutter_domain>/recordings/<roomNumber>/<token>
    

    Options:

    Parameter Description
    roomNumber Room number or ID.

    Install

    npm i @councilbox/shutter-js

    DownloadsWeekly Downloads

    131

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    73.4 kB

    Total Files

    13

    Last publish

    Collaborators

    • cbx-npm
    • mirodriguez11
    • aaronfuentes
    • alex_cbx