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

@mixer/cdk-std

Package Overview
Dependencies
Maintainers
7
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mixer/cdk-std

Standard library for Mixer Interactive controls

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

cdk-std Build Status

The cdk-std is the standard library for development with Mixer Interactive controls. It provides foundational functionality to communicate from your controls to the Mixer webpage. If you're using the Preact starter, this library is already largely wrapped up for you. If you're using the HTML starter code, you'll be dealing with this more directly.

Usage & Documentation

API documentation is available here.

We recommend importing this script through our CDN by adding a script tag in the <head> of your webpage:

<script  src="https://mixercc.azureedge.net/lib/std-v0.2.js"></script>

After importing it, mixer will be available as a global variable in your code. To send input, for example, you can call:

document.getElementById('hello-world').onclick = function(event) {
  mixer.socket.call('giveInput', {
    controlID: 'hello-world',
    event: 'click',
    button: event.button,
  });
};

For more information, head to our developer site!

Why is this needed?

For security reasons, all custom control code you write runs in a sandboxes iframe in the Mixer page. However, there's information we want to tell you about, such as the data coming down the Interactive websocket, the position of the video, and so on and so forth. This package provides a bridge and pleasant wrappers over postMessage, the protocol that allows that to happen.

                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Mixer webpage β”‚   β”‚   β”‚ Your Custom  β”‚
β”‚    or app    β”‚       β”‚   Controls   β”‚
β”‚           β”Œβ”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”           β”‚
β”‚         ◀──   cdk-std   β”œβ”€β–Ά         β”‚
β”‚           β””β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚

            Frame boundary

Keywords

FAQs

Package last updated on 01 Oct 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