mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Add contextAttributes to filter definition.
This commit is contained in:
parent
684c8c5df8
commit
45c2711522
1 changed files with 4 additions and 1 deletions
|
@ -799,6 +799,7 @@ async function setMaxVideoThroughput(c, bps) {
|
||||||
* @typedef {Object} filterDefinition
|
* @typedef {Object} filterDefinition
|
||||||
* @property {string} [description]
|
* @property {string} [description]
|
||||||
* @property {string} [contextType]
|
* @property {string} [contextType]
|
||||||
|
* @property {Object} [contextAttributes]
|
||||||
* @property {(this: Filter, src: CanvasImageSource, width: number, height: number, ctx: RenderingContext) => boolean} f
|
* @property {(this: Filter, src: CanvasImageSource, width: number, height: number, ctx: RenderingContext) => boolean} f
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -824,7 +825,9 @@ function Filter(stream, definition) {
|
||||||
/** @type {HTMLCanvasElement} */
|
/** @type {HTMLCanvasElement} */
|
||||||
this.canvas = document.createElement('canvas');
|
this.canvas = document.createElement('canvas');
|
||||||
/** @type {any} */
|
/** @type {any} */
|
||||||
this.context = this.canvas.getContext(definition.contextType || '2d');
|
this.context = this.canvas.getContext(
|
||||||
|
definition.contextType || '2d',
|
||||||
|
definition.contextAttributes || null);
|
||||||
/** @type {MediaStream} */
|
/** @type {MediaStream} */
|
||||||
this.captureStream = null;
|
this.captureStream = null;
|
||||||
/** @type {MediaStream} */
|
/** @type {MediaStream} */
|
||||||
|
|
Loading…
Reference in a new issue