@jamm-api/client
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -45,2 +45,5 @@ /// <reference types="node" /> | ||
}; | ||
integrations?: { | ||
youtube?: boolean; | ||
}; | ||
buttons?: { | ||
@@ -79,5 +82,7 @@ microphone?: boolean; | ||
params: { | ||
instanceId: string; | ||
start?: string; | ||
dark?: boolean; | ||
layoutModes?: string; | ||
integrations?: string; | ||
userDetails?: string; | ||
@@ -121,3 +126,2 @@ darkPrimaryColor?: string; | ||
convertToFormat?: CONVERT_FORMATS; | ||
instanceId: string; | ||
}; | ||
@@ -124,0 +128,0 @@ constructor(opts?: RoomOpts); |
@@ -30,5 +30,5 @@ "use strict"; | ||
/** | ||
* Create the HTML element that will hold the video embed | ||
* @param roomOpts {RoomOpts} | ||
*/ | ||
* Create the HTML element that will hold the video embed | ||
* @param roomOpts {RoomOpts} | ||
*/ | ||
var buildElement = function (_a) { | ||
@@ -79,6 +79,19 @@ var _b = _a.type, type = _b === void 0 ? 'iframe' : _b, _c = _a.width, width = _c === void 0 ? 500 : _c, _d = _a.height, height = _d === void 0 ? 500 : _d; | ||
if (typeof _this.opts.layoutModes !== 'undefined') { | ||
_this.params.layoutModes = Object.keys(_this.opts.layoutModes).filter(function (mode) { return mode; }).join(','); | ||
_this.params.layoutModes = Object.keys(_this.opts.layoutModes) | ||
.filter(function (mode) { return mode; }) | ||
.join(','); | ||
} | ||
if (typeof _this.opts.integrations !== 'undefined') { | ||
_this.params.integrations = Object.keys(_this.opts.integrations) | ||
.filter(function (mode) { return mode; }) | ||
.join(','); | ||
} | ||
if (typeof _this.opts.record !== 'undefined') { | ||
_this.params.recordKinds = Object.keys(_this.opts.record).filter(function (kind) { return _this.opts.record && typeof _this.opts.record[kind] === 'boolean' && _this.opts.record[kind]; }).join(','); | ||
_this.params.recordKinds = Object.keys(_this.opts.record) | ||
.filter(function (kind) { | ||
return _this.opts.record && | ||
typeof _this.opts.record[kind] === 'boolean' && | ||
_this.opts.record[kind]; | ||
}) | ||
.join(','); | ||
if (typeof _this.opts.record.format !== 'undefined') { | ||
@@ -137,5 +150,7 @@ _this.params.convertToFormat = _this.opts.record.format; | ||
if (this.element && this.element instanceof HTMLIFrameElement) { | ||
; | ||
this.element.src = this.url; | ||
} | ||
else if (this.element) { | ||
; | ||
this.element.location.href = this.url; | ||
@@ -172,3 +187,3 @@ } | ||
// If user does not want to start neither camera nor microphone, just include | ||
// an invalid parameter that will be filter out in the video embed | ||
// an invalid parameter that will be filtered out in the video embed | ||
this.params.start = 'no-media-at-start'; | ||
@@ -197,5 +212,7 @@ } | ||
if (this.element && this.element instanceof HTMLIFrameElement) { | ||
; | ||
this.element.src = this.url; | ||
} | ||
else if (this.element) { | ||
; | ||
this.element.location.href = this.url; | ||
@@ -202,0 +219,0 @@ } |
{ | ||
"name": "@jamm-api/client", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "JavaScript library for creating and joining Jamm Video embeds", | ||
@@ -5,0 +5,0 @@ "main": "dist-commonjs/index.js", |
Sorry, the diff of this file is not supported yet
26482
459