node package manager



A wrapper for the Node querystring module mimic provided by rollup-plugin-node-builtins for Video.js-based players.

Note: Does not support the querystring.escape or querystring.unescape properties.


npm install --save videojs-qs


There are two ways to use this module/plugin to retrieve a querystring-ish object. There is no particular advantage or disadvantage to one or the other - use whichever makes the most sense in your use-case.

videojs.qs() Method

Including this module will add the qs method to the videojs namespace. This is a function that returns a clone of the Node querystring built-in module.

var qs = videojs.qs().parse(;

qs Plugin

In addition to the videojs.qs() method, a plugin is added that registers a qs() method on every player instance. This method behaves identically to the videojs.qs() method.

var qs = player.qs().parse(;

querystring-ish Objects

The objects returned by the aforementioned API methods have the following methods available:


The general usage of this is to turn an object into a query string:

qs.stringify({foo: 'bar', bop: [1, 2]}); // "foo=bar&bop=1&bop=2" 

Note: This is also aliased as encode().


The general usage of this is to turn a query string into an object:

qs.parse('foo=bar&bop=1&bop=2'); // {foo: 'bar', bop: [1, 2]} 

Note: This is also aliased as decode().


This property does not come from the Rollup plugin!

The search property is provided by videojs-qs as a convenient way to reach a pre-parseed copy of the value in the current page context.

For example, if is ?foo=bar&bop=1&bop=2, the search property will look like: {foo: 'bar', bop: [1, 2]}.


Apache-2.0. Copyright (c) Brightcove, Inc.