Skip to content

Commit

Permalink
Merge pull request #855 from seiyako/master
Browse files Browse the repository at this point in the history
fix getFrameMediaDevices for iframed customer apps
  • Loading branch information
seiyako authored Mar 20, 2024
2 parents 56b9f84 + e77e774 commit 099f6dc
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amazon-connect-streams",
"version": "2.13.2",
"version": "2.13.3",
"description": "Amazon Connect Streams Library",
"engines": {
"node": ">=12.0.0"
Expand Down
2 changes: 1 addition & 1 deletion release/connect-streams-dr-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/connect-streams-dr.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/connect-streams-min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions release/connect-streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -26773,7 +26773,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017-

connect.core = {};
connect.core.initialized = false;
connect.version = "2.13.2";
connect.version = "2.13.3";
connect.outerContextStreamsVersion = null;
connect.DEFAULT_BATCH_SIZE = 500;

Expand Down Expand Up @@ -27654,7 +27654,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017-
}, timeout);
});
var mediaDevicesPromise = new Promise(function (resolve, reject) {
if (connect.isFramed() || connect.isCCP()) {
if (connect.isCCP()) {
if (navigator && navigator.mediaDevices) {
navigator.mediaDevices.enumerateDevices()
.then(function (devicesIn) {
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@
}, timeout);
});
var mediaDevicesPromise = new Promise(function (resolve, reject) {
if (connect.isFramed() || connect.isCCP()) {
if (connect.isCCP()) {
if (navigator && navigator.mediaDevices) {
navigator.mediaDevices.enumerateDevices()
.then(function (devicesIn) {
Expand Down
6 changes: 1 addition & 5 deletions test/unit/core.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1945,12 +1945,8 @@ describe('Core', function () {
sendUpstream: (...params) => connect.core.getEventBus().trigger(...params),
sendDownstream: (...params) => connect.core.getEventBus().trigger(...params)
});
sandbox.stub(connect, "isFramed").returns(true);
sandbox.stub(connect, "isCCP").returns(true);
connect.core.initPageOptions(params);
connect.isFramed.restore();
connect.isCCP.restore();
sandbox.stub(connect, "isFramed").returns(false);
sandbox.stub(connect, "isFramed").returns(true);
sandbox.stub(connect, "isCCP").returns(false);
});

Expand Down

0 comments on commit 099f6dc

Please sign in to comment.