mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
* dev: start LiveChat refactor * dev: implement simple module system to separate classes + add a few Live Chat actions * dev: add fundamental Live Chat classes * chore: update type declarations * feat: finalize Live Chat Now supporting almost all kinds of messages! Next up: add a ability to send messages. * chore: update type declarations * chore: update contributors list * feat(livechat): add `sendMessage()` method * chore: remove unneeded files * style: format code * chore: remove outdated examples * chore: update tests * chore: remove trailing spaces * chore: remove trailing spaces x2
17 lines
458 B
JavaScript
17 lines
458 B
JavaScript
'use strict';
|
|
|
|
const Text = require('../Text');
|
|
|
|
class UpdateViewershipAction {
|
|
type = 'UpdateViewershipAction';
|
|
|
|
constructor(data) {
|
|
const view_count_renderer = data.viewCount.videoViewCountRenderer;
|
|
|
|
this.view_count = new Text(view_count_renderer.viewCount);
|
|
this.extra_short_view_count = new Text(view_count_renderer.extraShortViewCount);
|
|
this.is_live = view_count_renderer.isLive;
|
|
}
|
|
}
|
|
|
|
module.exports = UpdateViewershipAction; |