From 298d140c283f034c6f1dd5c1b1f329c7f4cbdf23 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Fri, 20 Nov 2020 18:06:51 -0800 Subject: [PATCH] Connect to websocket in embed player. Closes #361 --- webroot/js/app-video-only.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webroot/js/app-video-only.js b/webroot/js/app-video-only.js index e70f72b93..c64e40a38 100644 --- a/webroot/js/app-video-only.js +++ b/webroot/js/app-video-only.js @@ -5,6 +5,13 @@ const html = htm.bind(h); import VideoPoster from './components/video-poster.js'; import { OwncastPlayer } from './components/player.js'; +// We count viewers by concurrent websocket connections. +// So for now let's make a connection just so it can +// be counted. +// https://github.com/owncast/owncast/discussions/374 +import Websocket from './utils/websocket.js'; +const websocket = new Websocket(); + import { addNewlines, pluralize,