---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/video/node-differences-from-javascript-sdk#article
headline: Differences from the JavaScript SDK
description: Map what you know from the Twilio Video JavaScript SDK to the server-side Video Media SDK for Node.js, including raw frames and platform support.
url: https://www.twilio.com/docs/video/node-differences-from-javascript-sdk
inLanguage: en
dateModified: 2026-10-05T15:56:06.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Differences from the JavaScript SDK

> \[!IMPORTANT]
>
> The Video Media SDK for Node.js is currently available as a Public Beta product and the information contained in this document is subject to change. This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available. Public Beta products are not covered by the Twilio Support Terms or [Twilio Service Level Agreement][sla].
>
> The Video Media SDK for Node.js is not a US [*Health Insurance Portability and Accountability Act* (HIPAA)][hipaa] Eligible Service or [*Payment Card Industry Data Security Standard* (PCI DSS)][pci] compliant and should not be enabled in workflows that are subject to HIPAA or PCI.

[hipaa]: https://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act

[pci]: https://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard

[sla]: https://help.twilio.com/articles/115002413087-Twilio-Beta-product-support

The Video Media SDK for Node.js shares the [Room][vRoom], [Participant][vPart], and [Track][vTrack] model and event names with the [Twilio Video JavaScript SDK][]. It connects with the same Access Token and `VideoGrant` format. It uses the JavaScript SDK object model.

## Shared concepts

The following concepts work the same way in both SDKs:

* To install either SDK, use npm.
* To return a `Room`, use the `connect()` method. The `Room` exposes `participants` and emits `Participant` lifecycle events.
* Remote media flows through `RemoteParticipant`, `trackSubscribed`, and `trackUnsubscribed`.
* Tracks come in three varieties: video, audio, and data.
* Publish tracks through `LocalParticipant` and received through `RemoteParticipant`.
* `Room` re-emits Participant track events with the emitting `RemoteParticipant` as the final argument.

## What changes on the server

The Node.js SDK runs on a server without camera, microphone, or screen. The following table maps each feature between browser and server.

|                     | Video JavaScript SDK                                                 | Video Media SDK for Node.js                                                                                                                                                                                               |
| ------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Send video frames   | Captures local media from a camera or microphone.                    | Push raw frames without device capture.                                                                                                                                                                                   |
| Render video frames | Renders remote media.                                                | Has no `attach()` method. Delivers raw decoded frames through the `frames()` async iterator.                                                                                                                              |
| Accept audio inputs | Accepts various input from devices.                                  | Uses 48 kHz mono S16LE PCM.                                                                                                                                                                                               |
| Choose codecs       | Uses the codecs the browser supports, including VP8, VP9, and H.264. | Supports only VP8 video and Opus or PCMU audio. Can't publish or subscribe to H.264 or VP9 video tracks. Any other value in `preferredVideoCodecs` or `preferredAudioCodecs` makes `connect()` reject with a `TypeError`. |
| Tune bandwidth      | Supports adaptive simulcast and the TrackPriority API.               | Uses `bandwidthProfile`, `encodingParameters`, and `setContentPreferences()`.                                                                                                                                             |
| Create local tracks | Creates asynchronously after device permission.                      | Creates synchronously without device prompt.                                                                                                                                                                              |
| Send data messages  | `send()` returns nothing.                                            | `send()` returns a promise that always resolves to `{ ok, messageId, error }`, never rejects, and throws a `RangeError` synchronously for a message larger than 64 KB.                                                    |
| End a session       | Your app calls `room.disconnect()`.                                  | Your app calls `room.disconnect()`, and then `room.dispose()` to release native resources. Until your app calls `dispose()`, the Node.js process doesn't exit.                                                            |

## Platform differences

The JavaScript SDK runs in a browser. The Node.js SDK runs on Node.js version 24.0.0 or later on Linux x86-64, or on macOS x86-64 for local development. On an Apple Silicon Mac, you need an x64 build of Node.js. To learn more, see [system requirements][].

## Next steps

* [Quickstart][]: Connect to a Room and move your first frames.
* [Work with media frames][]: Learn the I420 video and PCM audio formats that replace device capture and rendering.

[Quickstart]: /docs/video/node-getting-started

[system requirements]: /docs/video/node#system-requirements

[Twilio Video JavaScript SDK]: /docs/video/javascript

[Work with media frames]: /docs/video/node-working-with-media-frames

[vPart]: /docs/video/api/participants

[vRoom]: /docs/video/api/rooms-resource

[vTrack]: /docs/video/api/publishedtrack
