You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.4 KiB
43 lines
1.4 KiB
// dtp-plugin.js
|
|
// Copyright (C) 2021 Digital Telepresence, LLC
|
|
// License: Apache-2.0
|
|
|
|
/**
|
|
* I am just getting started roughing in the framework for DtpPlugin.
|
|
* DtpPlugin will be the base class for developers to use when creating a plugin
|
|
* intended to run within a DTP call.
|
|
*
|
|
* DtpApp will first create a data channel within the current call to implement
|
|
* the plugin's communications among call participants. DtpApp will then
|
|
* configure the view with a <div> and populate a plugin-safe object with
|
|
* information about the call participants.
|
|
*
|
|
* The plugin will be given these objects. It will instantiate itself into the
|
|
* parent <div> provided by DtpApp, wire up any event handlers it needs, etc. It
|
|
* can then immediately begin sending and receiving data among the call
|
|
* participants and indicate whatever is needed within the <div> provided.
|
|
*
|
|
* Some plugins may instantiate a <canvas> within the <div>. Canvas2D, WebGL,
|
|
* Web Audio API, Gamepad API, and the rest of the web are available directly to
|
|
* DTP plugins.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const DTP_COMPONENT_NAME = 'dtp:plugin';
|
|
|
|
window.dtp = window.dtp || { };
|
|
|
|
import DtpLog from 'dtp/dtp-log.js';
|
|
|
|
export default class DtpPlugin {
|
|
|
|
constructor (app, context, componentName) {
|
|
this.app = app;
|
|
this.context = context;
|
|
this.componentName = componentName;
|
|
this.log = new DtpLog(`${DTP_COMPONENT_NAME}:${componentName}`);
|
|
}
|
|
}
|
|
|
|
window.dtp.DtpPlugin = DtpPlugin;
|