@whereby.com/browser-sdk 2.0.0-alpha2 → 2.0.0-alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.cjs.js +7 -6
- package/dist/lib.esm.js +7 -6
- package/dist/types.d.ts +4 -3
- package/dist/{v2-alpha2.js → v2-alpha3.js} +8 -8
- package/package.json +1 -1
package/dist/lib.cjs.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var heresy = require('heresy');
|
|
6
|
-
var React = require('react');
|
|
7
6
|
var tslib = require('tslib');
|
|
7
|
+
var React = require('react');
|
|
8
8
|
var adapter = require('webrtc-adapter');
|
|
9
9
|
var io = require('socket.io-client');
|
|
10
10
|
var SDPUtils = require('sdp');
|
|
@@ -130,7 +130,7 @@ heresy.define("WherebyEmbed", {
|
|
|
130
130
|
if (!subdomain)
|
|
131
131
|
return this.html `Whereby: Missing subdomain attr.`;
|
|
132
132
|
const url = new URL(room, `https://${subdomain}.whereby.com`);
|
|
133
|
-
Object.entries(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ jsApi: true, we: "2.0.0-
|
|
133
|
+
Object.entries(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ jsApi: true, we: "2.0.0-alpha3", iframeSource: subdomain }, (displayName && { displayName })), (lang && { lang })), (metadata && { metadata })), (groups && { groups })), (virtualBackgroundUrl && { virtualBackgroundUrl })), (avatarUrl && { avatarUrl })), (minimal != null && { embed: minimal })), boolAttrs.reduce(
|
|
134
134
|
// add to URL if set in any way
|
|
135
135
|
(o, v) => (this[v.toLowerCase()] != null ? Object.assign(Object.assign({}, o), { [v]: this[v.toLowerCase()] }) : o), {}))).forEach(([k, v]) => {
|
|
136
136
|
if (!url.searchParams.has(k) && typeof v === "string") {
|
|
@@ -146,13 +146,14 @@ heresy.define("WherebyEmbed", {
|
|
|
146
146
|
},
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
var
|
|
149
|
+
var VideoView = (_a) => {
|
|
150
|
+
var { stream } = _a, rest = tslib.__rest(_a, ["stream"]);
|
|
150
151
|
const videoEl = React.useCallback((node) => {
|
|
151
152
|
if (node !== null && node.srcObject !== stream) {
|
|
152
153
|
node.srcObject = stream;
|
|
153
154
|
}
|
|
154
155
|
}, []);
|
|
155
|
-
return React__default["default"].createElement("video", { ref: videoEl, autoPlay: true, playsInline: true,
|
|
156
|
+
return React__default["default"].createElement("video", Object.assign({ ref: videoEl, autoPlay: true, playsInline: true }, rest));
|
|
156
157
|
};
|
|
157
158
|
|
|
158
159
|
const EVENTS = {
|
|
@@ -5456,12 +5457,12 @@ function useRoomConnection(roomUrl, roomConnectionOptions) {
|
|
|
5456
5457
|
},
|
|
5457
5458
|
},
|
|
5458
5459
|
{
|
|
5459
|
-
VideoView
|
|
5460
|
+
VideoView,
|
|
5460
5461
|
},
|
|
5461
5462
|
];
|
|
5462
5463
|
}
|
|
5463
5464
|
|
|
5464
|
-
const sdkVersion = "2.0.0-
|
|
5465
|
+
const sdkVersion = "2.0.0-alpha3";
|
|
5465
5466
|
|
|
5466
5467
|
exports.sdkVersion = sdkVersion;
|
|
5467
5468
|
exports.useRoomConnection = useRoomConnection;
|
package/dist/lib.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { define, ref } from 'heresy';
|
|
2
|
+
import { __rest, __awaiter } from 'tslib';
|
|
2
3
|
import React, { useCallback, useState, useReducer, useEffect } from 'react';
|
|
3
|
-
import { __awaiter } from 'tslib';
|
|
4
4
|
import adapter from 'webrtc-adapter';
|
|
5
5
|
import io from 'socket.io-client';
|
|
6
6
|
import SDPUtils from 'sdp';
|
|
@@ -115,7 +115,7 @@ define("WherebyEmbed", {
|
|
|
115
115
|
if (!subdomain)
|
|
116
116
|
return this.html `Whereby: Missing subdomain attr.`;
|
|
117
117
|
const url = new URL(room, `https://${subdomain}.whereby.com`);
|
|
118
|
-
Object.entries(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ jsApi: true, we: "2.0.0-
|
|
118
|
+
Object.entries(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ jsApi: true, we: "2.0.0-alpha3", iframeSource: subdomain }, (displayName && { displayName })), (lang && { lang })), (metadata && { metadata })), (groups && { groups })), (virtualBackgroundUrl && { virtualBackgroundUrl })), (avatarUrl && { avatarUrl })), (minimal != null && { embed: minimal })), boolAttrs.reduce(
|
|
119
119
|
// add to URL if set in any way
|
|
120
120
|
(o, v) => (this[v.toLowerCase()] != null ? Object.assign(Object.assign({}, o), { [v]: this[v.toLowerCase()] }) : o), {}))).forEach(([k, v]) => {
|
|
121
121
|
if (!url.searchParams.has(k) && typeof v === "string") {
|
|
@@ -131,13 +131,14 @@ define("WherebyEmbed", {
|
|
|
131
131
|
},
|
|
132
132
|
});
|
|
133
133
|
|
|
134
|
-
var
|
|
134
|
+
var VideoView = (_a) => {
|
|
135
|
+
var { stream } = _a, rest = __rest(_a, ["stream"]);
|
|
135
136
|
const videoEl = useCallback((node) => {
|
|
136
137
|
if (node !== null && node.srcObject !== stream) {
|
|
137
138
|
node.srcObject = stream;
|
|
138
139
|
}
|
|
139
140
|
}, []);
|
|
140
|
-
return React.createElement("video", { ref: videoEl, autoPlay: true, playsInline: true,
|
|
141
|
+
return React.createElement("video", Object.assign({ ref: videoEl, autoPlay: true, playsInline: true }, rest));
|
|
141
142
|
};
|
|
142
143
|
|
|
143
144
|
const EVENTS = {
|
|
@@ -5441,11 +5442,11 @@ function useRoomConnection(roomUrl, roomConnectionOptions) {
|
|
|
5441
5442
|
},
|
|
5442
5443
|
},
|
|
5443
5444
|
{
|
|
5444
|
-
VideoView
|
|
5445
|
+
VideoView,
|
|
5445
5446
|
},
|
|
5446
5447
|
];
|
|
5447
5448
|
}
|
|
5448
5449
|
|
|
5449
|
-
const sdkVersion = "2.0.0-
|
|
5450
|
+
const sdkVersion = "2.0.0-alpha3";
|
|
5450
5451
|
|
|
5451
5452
|
export { sdkVersion, useRoomConnection };
|
package/dist/types.d.ts
CHANGED
|
@@ -31,11 +31,12 @@ declare global {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
interface
|
|
34
|
+
interface VideoViewSelfProps {
|
|
35
35
|
stream: MediaStream;
|
|
36
36
|
style?: React.CSSProperties;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
type VideoViewProps = VideoViewSelfProps & React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
|
|
39
|
+
declare const _default: ({ stream, ...rest }: VideoViewProps) => JSX.Element;
|
|
39
40
|
|
|
40
41
|
interface RoomParticipantData {
|
|
41
42
|
displayName: string;
|
|
@@ -99,6 +100,6 @@ interface RoomConnectionComponents {
|
|
|
99
100
|
}
|
|
100
101
|
declare function useRoomConnection(roomUrl: string, roomConnectionOptions: RoomConnectionOptions): [state: RoomState, actions: RoomConnectionActions, components: RoomConnectionComponents];
|
|
101
102
|
|
|
102
|
-
declare const sdkVersion = "2.0.0-
|
|
103
|
+
declare const sdkVersion = "2.0.0-alpha3";
|
|
103
104
|
|
|
104
105
|
export { sdkVersion, useRoomConnection };
|