@mux/mux-active-viewer-count v0.2.0-alpha.7
Introduction
<mux-active-viewer-count></mux-active-viewer-count>
is a Mux-flavored HTML5 viewer count element.
This element shows the current number of viewers for the specified video.
Installation
If you're using npm
or yarn
, install that way:
Package manager
yarn add @mux/mux-active-viewer-count
or
npm i @mux/mux-active-viewer-count
Then, import the library into your application with either import
or require
:
import '@mux/mux-active-viewer-count';
or
require('@mux/mux-active-viewer-count');
CDN option
Alternatively, use the CDN hosted version of this package:
<script src="https://cdn.jsdelivr.net/npm/@mux/mux-active-viewer-count@0"></script>
If you are using ecmascript modules, you can also load the mux-active-viewer-count.mjs
file with type=module
:
<script type="module" src="https://cdn.jsdelivr.net/npm/@mux/mux-active-viewer-count@0/dist/mux-active-viewer-count.mjs"></script>
Usage
<mux-active-viewer-count>
has two attributes. The first is called token
, and it should be a signed JavaScript Web Token (JWT)
for which you want the viewer count. (For more information on creating a JWT for a particular video, see
https://docs.mux.com/guides/data/see-how-many-people-are-watching.
The second attribute is called poll-interval
. It specifies the number of seconds that the component should wait between
requests to get the viewer count. It defaults to 20 seconds, and should be no lower than 15 seconds.
23 hours ago
1 day ago
2 days ago
14 days ago
19 days ago
20 days ago
19 days ago
19 days ago
28 days ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
8 months ago
9 months ago
9 months ago
7 months ago
8 months ago
7 months ago
9 months ago
6 months ago
8 months ago
6 months ago
9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
7 months ago
6 months ago
7 months ago
7 months ago
8 months ago
9 months ago
8 months ago
9 months ago
7 months ago
9 months ago
6 months ago
9 months ago
7 months ago
9 months ago
8 months ago
6 months ago
8 months ago
9 months ago
9 months ago
7 months ago
8 months ago
9 months ago
7 months ago
9 months ago
8 months ago
9 months ago
6 months ago
9 months ago
7 months ago
9 months ago
9 months ago
6 months ago
6 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
6 months ago
8 months ago
8 months ago
9 months ago
6 months ago
9 months ago
6 months ago
8 months ago
7 months ago
9 months ago
9 months ago
8 months ago
8 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago