Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mixer/interactive-node

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mixer/interactive-node

A NodeJS and Browser compatible client for mixer.com's interactive 2 Protocol

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

Interactive Node

Build Status

A TypeScript, Node.js and Browser(JavaScript) compatible client for Mixer.com's interactive 2 Protocol.

For an introduction to interactive2 checkout the reference docs on the developers site.

Installation

You can use npm(recommended) or download a zip from the releases page.

Browser

<script src="dist/interactive.js"></script>

Node

npm i --save @mixer/interactive-node

Usage

Authentication

OAuth 2.0 is used for authentication. Valid bearer tokens can be passed in the Client.open method.

For more information about Mixer's OAuth visit the OAuth reference page on our developer site.

Browser

index.html
<doctype html>
<html>
    <head>
        <title>Interactive 2</title>
    </head>
    <body>
        <script src="js/interactive.js"></script>
        <script src="js/app.js"></script>
    </body>
</html>
app.js
const client = new interactive.GameClient();

client.open({
    authToken: '<OAuth Token>',
    versionId: 1234,
});

Node

JavaScript
const interactive = require('@mixer/interactive-node');
const ws = require('ws');

interactive.setWebSocket(ws);

const client = new interactive.GameClient();

client.open({
    authToken: '<OAuth Token>',
    versionId: 1234,
});
TypeScript
import { GameClient, setWebSocket } from '@mixer/interactive-node';
import * as ws from 'ws';

setWebSocket(ws);

const client = new GameClient();

client.open({
    authToken: '<OAuth Token>',
    versionId: 1234,
});

Examples

Checkout our examples to get up to speed quickly!

  • basic - Connects and sets up 5 buttons, when they are clicked the participant is charged 1 spark.
  • dynamicControls - Connects and then creates and destroys 5 buttons with random text.
  • joystick - Connects and creates a joystick, logs participant coordinate values.

Using Node.js? Clone this repository and run npm run build and the examples will be converted to JavaScript for you!

Documentation

Checkout our reference docs here.

Development

To get a development environment setup:

  1. Clone this repository
  2. npm install
  3. npm run build

Contributing

Thanks for your interested in contributing, checkout TODO.md for a list of tasks!

Open a Pull Request we'd love to see your contributions.

Keywords

FAQs

Package last updated on 23 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc