-
Couldn't load subscription status.
- Fork 98
Is it possible to use this from userscript like Tampermonkey or anything similar? #348
-
I'm wondering if there's a way to integrate this with a userscript to send data to OBS from that. 99.99% sure it's not, but worth asking, maybe someone will lead me onto the right path or another solution.
E.g. this:
// ==UserScript==
// @name Test
// @namespace http://tampermonkey.net/
// @version 2024年01月14日
// @description try to take over the world!
// @author You
// @match *://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=npmjs.com
// @require https://cdn.jsdelivr.net/npm/obs-websocket-js
// @grant none
// ==/UserScript==
(async function() {
'use strict';
const obs = new OBSWebSocket();
await obs.connect('ws://192.168.0.4:4455');
})();
results in:
Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
Any other ideas on how to send data from userscript to OBS?
EDIT: I guess it works if you enable insecure content in Chrome at least, but is there any way to make it secure without manual tinkering with such options, which shouldn't really be enabled in the 1st place? I guess there's wss option but no clue how to enable that possibility as it doesn't work by default.
Beta Was this translation helpful? Give feedback.
All reactions
Ok, you just need to use tunnelling it seems: https://github.com/obsproject/obs-websocket/wiki/SSL-Tunneling Solved with ngrok.
Replies: 1 comment
-
Ok, you just need to use tunnelling it seems: https://github.com/obsproject/obs-websocket/wiki/SSL-Tunneling Solved with ngrok.
Beta Was this translation helpful? Give feedback.