Skip to content

About

A framework that wraps over Immix.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

Immix Framework

A wrapper around the Immix API.

THIS PROJECT WAS DEVELOPED FOR LIVE VIDEO DEFENSE

This project is in Alpha, there is no guarantee of a full version.

Documentation on both the Immix Framework and parts of the Immix API (via RE) is available in PDF format (download suggested, originally made in Figma) /Docs.pdf.


Extra documentation on this project can be found in test.js in /test/test.js
To perform a test, setup the config in /test (conf docs) then in the main directory run npm test

Will not be released on NPM, link your projects with npm link

PLEASE PUT A CHROME INSTALLATION INTO ./chrome OR SET PATH WITH CONFIG

Getting Started

Example:

async...
const IMMIX = require('immixFramework')();
const immixConfig = {
  "username": "John",
  "password": "JohnDoe123",
  "immixUri": "immix.mysecuritysite.com"
}

try {
  await IMMIX.Session.open(immixConfig);
  const allSites = await IMMIX.Sites.getSites();
  //returns. [{armed: (Boolean), groupid: (Number), groupTypeId: (Number), isdisabled : (Boolean), title: (String)}]
  console.log(allSites);
  IMMIX.Session.close(() => process.exit(1));
} catch (err) {
  console.error(err);
}

Audit Auth Example (BETA):

/*
Audit authrozation allows the fetching of media from Immix for downloading
*/

async...
const IMMIX = require('immixFramework')();
const immixConfig = {
  "username": "John",
  "password": "JohnDoe123",
  "immixUri": "immix.mysecuritysite.com"
}


//audit config
IMMIX.Config.immixSettings.auditAuthSite = 'FrameworkAccessSiteOfSomeSort'; //a site the framework can use to get auth, preferably make a site meant for it, and put its name here
IMMIX.Session.getAuditAuth = true;

//settings
IMMIX.Config.debug.useLogs = true; //uses logs

//always call above snippets before loading

try {
  await IMMIX.Session.open(immixConfig);
  const allMediaForEvent = await IMMIX.Audit.getMediaFromEventID(1234567)
  console.log(allMediaForEvent);
  IMMIX.Session.close(() => process.exit(1));
} catch (err) {
  console.error(err);
}

Framework Configuration:

//CONFIG:
IMMIX.Config.browserExecutablePath // ("./chrome/chrome.exe")
IMMIX.Config.immixSettings.immixURI // (set-by-config)
IMMIX.Config.immixSettings.useHttps // (true) - UNTESTED IF FALSE
IMMIX.Config.immixSettings.username // (set-by-config)
IMMIX.Config.immixSettings.password // (set-by-config)
IMMIX.Config.immixSettings.immixMonitoringStationId // (1)
IMMIX.Config.immixSettings.puppeteerRetryAttempts // (3)
IMMIX.Config.immixSettings.auditAuthSite // (undefined)

//PROXY SETTINGS:
IMMIX.Config.proxySettings.port // (3000)
IMMIX.Config.proxySettings.proxyAPI // ("/proxy/v1/")
IMMIX.Config.proxySettings.proxyEndpoint // ("/proxy/endpoints/")
IMMIX.Config.proxySettings.proxyReqDelay // (3000)
IMMIX.Config.proxySettings.proxyPuppeteerDelay // (3000)

//DEBUG SETTINGS:
IMMIX.Config.debug.puppeteerHeadless // (true)
IMMIX.Config.debug.useLogs // (false)

Framework Session Managment:

await IMMIX.Session.open(config);
await IMMIX.Session.reload();
await IMMIX.Session.reload(true); - reloads with audit auth
IMMIX.Session.close(() => {});

IMMIX.Session.switchToStation(stationConfig); - switches stations
/* ex.
stationConfig = {
  "username": "John",
  "password": "JohnDoe123",
  "stationId": 104 //id of station to switch to
}
*/

//OBJECTS:
IMMIX.Session.isAuthorized
IMMIX.Session.sessionCookie
IMMIX.Session.auditAuth
IMMIX.Session.puppeteerSessionCookie
IMMIX.Session.connection
IMMIX.Session.getAuditAuth

About

A framework that wraps over Immix.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages