Coder Social home page Coder Social logo

opentok / accelerator-core-js Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 38.0 5.46 MB

Accelerator Core provides a simple way to integrate real-time audio/video into your web application using the OpenTok Platform

Home Page: https://www.vonage.com/communications-apis/video/

License: MIT License

JavaScript 91.96% HTML 2.87% CSS 5.16%
annotations javascript opentok screensharing tokbox video webrtc

accelerator-core-js's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

accelerator-core-js's Issues

Bad sdkWrapper link on README.md

New issue checklist

General information

  • Library version(s): 2.0.12
  • iOS/Android/Browser version(s):
  • Devices/Simulators/Machine affected:
  • Reproducible in the demo project? (Yes/No):
  • Related issues:

Bug report

The link to the sdkWrapper doc is wrong on the README.md file

Expected behavior

show the doc

Actual behavior

nothing

Steps to reproduce

clink the link

Crash log? Screenshots? Videos? Sample project?

...

Question or Feature Request

...

Vide Chat Embeds - stylesheet not loading

Hi,

I am using video chat embed and according to documentation, I'm using the following code.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="otEmbedContainer" style="width:800px; height:640px"></div>
    <script
        src="https://tokbox.com/embed/embed/ot-embed.js?embedId=<embed-id>&room=DEFAULT_ROOM"></script>
</body>

</html>

It's working fine but the stylesheet is not loading and I'm unable to see a small screen when video chat starts at the top right.

I am getting the following error:
OpenTok:StylableComponent:warn Calling setStyle() has no effect because theshowControls option was set to false +0ms
OpenTok:processPubOptions:warn OT.Publisher: Setting video constraint to false, there are no video sources +0ms
OpenTok:StylableComponent:warn Calling setStyle() has no effect because theshowControls option was set to false +14s

image

The screen is showing like below:
image

Please share your feedback.

Thanks

How to stream one way video ?

New issue checklist

General information

  • Library version(s):
  • iOS/Android/Browser version(s):
  • Devices/Simulators/Machine affected:
  • Reproducible in the demo project? (Yes/No):
  • Related issues:

Bug report

Expected behavior

...

Actual behavior

...

Steps to reproduce

...

Crash log? Screenshots? Videos? Sample project?

...

Question or Feature Request

...

sdkWrapper dont fire event when publisher don't have a DOM element

New issue checklist

General information

  • Library version(s): 2.0.12
  • iOS/Android/Browser version(s): Chrome 62, Firefox 57b
  • Devices/Simulators/Machine affected: Linux
  • Reproducible in the demo project? (Yes/No): No found a sample using this way
  • Related issues:

Bug report

When generate a publisher without a DOM element, never receive the videoElementCreated event

Expected behavior

Receive the DOM element on the event

Actual behavior

The event never fire

Steps to reproduce

Crash log? Screenshots? Videos? Sample project?

import { OpenTokSDK } from 'opentok-accelerator-core'

const cfg = {
  api_key: "XXX",
  session: "XXXXX",
  token: "XXXXX"
}

const properties = { insertDefaultUI: false }
const events = {
  'videoElementCreated': (event) => { console.warn('videoElementCreated', event)}
}

const sdk = new OpenTokSDK({
  apiKey: cfg.api_key,
  sessionId: cfg.session,
  token: cfg.token
})
const startCall = () => { sdk.publish(null, properties, events, true)  }
sdk.connect().then(() => { startCall() } )

Question or Feature Request

If use plain OT library work as advertised

const session = OT.initSession(cfg.api_key, cfg.session)
const properties = { insertDefaultUI: false }
session.connect(cfg.token, (error) => {
  if (error) {
    console.error('connection error', error)
  } else {
    let publisher = OT.initPublisher(null, properties);
    publisher.on('videoElementCreated', (event) => console.warn('videoElementCreated', event) )
    session.publish(publisher);
  }
})

OpentokJS 2.19 setVideoSource()

Opentok 2.19 recently introduced a setVideoSource that lets users change devices without having to rejoin the call. Can this be added to accelerator core?

opentok-solutions-logging-1.1.1.tgz: 2 vulnerabilities (highest severity is: 6.5)

Vulnerable Library - opentok-solutions-logging-1.1.1.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/axios/package.json

Vulnerabilities

CVE Severity CVSS Exploit Maturity EPSS Dependency Type Fixed in (opentok-solutions-logging version) Remediation Possible** Reachability
CVE-2023-45857 Medium 6.5 Not Defined 0.1% axios-0.21.4.tgz Transitive N/A*
CVE-2023-26159 Medium 6.1 Not Defined 0.1% follow-redirects-1.15.1.tgz Transitive N/A*

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the "Details" section below to see if there is a version of transitive dependency where vulnerability is fixed.

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2023-45857

Vulnerable Library - axios-0.21.4.tgz

Promise based HTTP client for the browser and node.js

Library home page: https://registry.npmjs.org/axios/-/axios-0.21.4.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/axios/package.json

Dependency Hierarchy:

  • opentok-solutions-logging-1.1.1.tgz (Root Library)
    • axios-0.21.4.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

An issue discovered in Axios 1.5.1 inadvertently reveals the confidential XSRF-TOKEN stored in cookies by including it in the HTTP header X-XSRF-TOKEN for every request made to any host allowing attackers to view sensitive information.

Publish Date: 2023-11-08

URL: CVE-2023-45857

Threat Assessment

Exploit Maturity: Not Defined

EPSS: 0.1%

CVSS 3 Score Details (6.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2023-11-08

Fix Resolution: axios - 1.6.0

CVE-2023-26159

Vulnerable Library - follow-redirects-1.15.1.tgz

HTTP and HTTPS modules that follow redirects.

Library home page: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/axios/node_modules/follow-redirects/package.json

Dependency Hierarchy:

  • opentok-solutions-logging-1.1.1.tgz (Root Library)
    • axios-0.21.4.tgz
      • follow-redirects-1.15.1.tgz (Vulnerable Library)

Found in base branch: main

Vulnerability Details

Versions of the package follow-redirects before 1.15.4 are vulnerable to Improper Input Validation due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.

Publish Date: 2024-01-02

URL: CVE-2023-26159

Threat Assessment

Exploit Maturity: Not Defined

EPSS: 0.1%

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://www.cve.org/CVERecord?id=CVE-2023-26159

Release Date: 2024-01-02

Fix Resolution: follow-redirects - 1.15.4

Stale camera subscriber DOM elements are not unmounted

New issue checklist

General information

  • Library version(s): "opentok-accelerator-core": "^2.0.17",
  • iOS/Android/Browser version(s): Chrome Version 87.0.4280.88
  • Devices/Simulators/Machine affected:
  • Reproducible in the demo project? (Yes/No): Sporadically reproducable
  • Related issues:

Bug report

Expected behavior

camera subscriber DOM elements should be unmounted when their corresponding streams are destroyed.

Actual behavior

I’m noticing that 2 out of 3 stale camera subscriber DOM elements are stale, i.e. still mounted when a valid stream only exists for one of the three.

Steps to reproduce

Seems to happen sporadically in my prototype

Crash log? Screenshots? Videos? Sample project?

image
image
image

Question or Feature Request

Could this issue be caused by a bug in my application code? My understanding is that the accelerator-core is responsible for handling DOM updates behind the scenes.

Cancelling a screenshare and not having system permissions has the same error message

When I .publish with "videoSource: application" to trigger the screen share prompt, whether I disallowed permission in my system preferences and try to screenshare (first screenshot), or press cancel on the prompt (second screenshot), they both throw the same error.

{"code":1500,"message":"OT.Publisher Access Denied: Permission Denied: End-user denied permission to hardware devices (getUserMedia error: NotAllowedError)","name":"OT_USER_MEDIA_ACCESS_DENIED","stack":"Error: End-user denied permission to hardware devices (getUserMedia error: NotAllowedError)

This makes it hard to give the user a warning and instructions on how to enable screenshare system permissions it could potentially be just them opening and closing the screenshare dialog. Are there other ways to detect whether there is system permissions or not to screenshare?

Using the underlying OT.checkScreenSharingCapability() method, it always returns "supported: true" even without system permissions enabled. It seems like that method just checks the browser version instead of if it can actually access the screen?

image

image

"Calling setStyle() has no effect" warning

New issue checklist

General information

  • Library version(s):
    opentok.js: 2.16.1,
    opentok-accelerator-core: 2.0.15
    opentok-annotation: 2.0.59
    opentok-archiving: 1.0.19,
    opentok-screen-sharing: 1.0.33
    opentok-text-chat: 1.0.30

  • iOS/Android/Browser version(s): Google Chrome 73

  • Devices/Simulators/Machine affected:

  • Reproducible in the demo project? (Yes/No):

  • Related issues:

Bug report

Expected behavior

No warnings in console.

Actual behavior

Warnings from opentok.

console.js:35 OpenTok:StylableComponent:warn Calling setStyle() has no effect because theshowControls option was set to false +0ms
e.(anonymous function) @ console.js:35
o @ common.js:118
e.setStyle @ stylable_component.js:268
publish @ index.js:1123
(anonymous) @ init.js:529
(anonymous) @ communication.js:211
value @ communication.js:205
(anonymous) @ communication.js:262
value @ communication.js:237
(anonymous) @ communication.js:438
value @ communication.js:389
value @ core.js:762
(anonymous) @ index.js:formatted:3845
(anonymous) @ react-dom.production.min.js:14
f @ react-dom.production.min.js:15
(anonymous) @ react-dom.production.min.js:15
L @ react-dom.production.min.js:17
T @ react-dom.production.min.js:18
S @ react-dom.production.min.js:18
j @ react-dom.production.min.js:21
kn @ react-dom.production.min.js:84
is @ react-dom.production.min.js:241
Re @ react-dom.production.min.js:39
Tn @ react-dom.production.min.js:86
ss @ react-dom.production.min.js:241
On @ react-dom.production.min.js:85
o @ raven.js:376

Steps to reproduce

...

Crash log? Screenshots? Videos? Sample project?

...

Question or Feature Request

...

Error: while running the example with Electron wrapper -- p.post in bot a function

New issue checklist

General information

  • Library version(s):
  • iOS/Android/Browser version(s):
  • Devices/Simulators/Machine affected:
  • Reproducible in the demo project? (Yes/No):
  • Related issues:

Bug report

CONNECTION ERROR TypeError: p.post is not a function
    at analytics.js:36
    at e (QueueRunner.js:22)
    at e.t.run (QueueRunner.js:26)
    at e.t.add (QueueRunner.js:9)
    at analytics.js:34
    at e.exports.logEvent (analytics.js:150)
    at analytics.js:110
    at guid_storage.js:118
    at Object.get (guid_storage.js:138)
    at guid_storage.js:30


#### Expected behavior

> ...

#### Actual behavior

> ...

#### Steps to reproduce

> ...

#### Crash log? Screenshots? Videos? Sample project?

>...

## Question or Feature Request

> ...

mismatch enableSubscriberAudio and enableSubscriberVideo on sdkWrapper

New issue checklist

General information

  • Library version(s): 2.0.12
  • iOS/Android/Browser version(s): Browser
  • Devices/Simulators/Machine affected: all
  • Reproducible in the demo project? (Yes/No): no
  • Related issues:

Bug report

the enableSubscriberAudio/enableSubscriberVideo methods on sdkWrapper mismatch the call to the same method on the subscriber

https://github.com/opentok/accelerator-core-js/blob/master/src/sdk-wrapper/sdkWrapper.js#L183
https://github.com/opentok/accelerator-core-js/blob/master/src/sdk-wrapper/sdkWrapper.js#L195

Expected behavior

call the correct methods

Actual behavior

Video call Audio and vice versa

Steps to reproduce

use the methods on the sdkWrapper

Crash log? Screenshots? Videos? Sample project?

...

Question or Feature Request

...

opentok-solutions-logging-1.0.15.tgz: 4 vulnerabilities (highest severity is: 7.5) - autoclosed

Vulnerable Library - opentok-solutions-logging-1.0.15.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/follow-redirects/package.json

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in Remediation Available
CVE-2021-3749 High 7.5 axios-0.19.2.tgz Transitive 1.1.1
CVE-2022-0155 Medium 6.5 follow-redirects-1.5.10.tgz Transitive 1.1.1
CVE-2022-0536 Medium 5.9 follow-redirects-1.5.10.tgz Transitive 1.1.1
CVE-2020-28168 Medium 5.9 axios-0.19.2.tgz Transitive 1.1.1

Details

CVE-2021-3749

Vulnerable Library - axios-0.19.2.tgz

Promise based HTTP client for the browser and node.js

Library home page: https://registry.npmjs.org/axios/-/axios-0.19.2.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/axios/package.json

Dependency Hierarchy:

  • opentok-solutions-logging-1.0.15.tgz (Root Library)
    • axios-0.19.2.tgz (Vulnerable Library)

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Found in base branch: main

Vulnerability Details

axios is vulnerable to Inefficient Regular Expression Complexity

Publish Date: 2021-08-31

URL: CVE-2021-3749

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://huntr.dev/bounties/1e8f07fc-c384-4ff9-8498-0690de2e8c31/

Release Date: 2021-08-31

Fix Resolution (axios): 0.20.0

Direct dependency fix Resolution (opentok-solutions-logging): 1.1.1

⛑️ Automatic Remediation is available for this issue

CVE-2022-0155

Vulnerable Library - follow-redirects-1.5.10.tgz

HTTP and HTTPS modules that follow redirects.

Library home page: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/follow-redirects/package.json

Dependency Hierarchy:

  • opentok-solutions-logging-1.0.15.tgz (Root Library)
    • axios-0.19.2.tgz
      • follow-redirects-1.5.10.tgz (Vulnerable Library)

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Found in base branch: main

Vulnerability Details

follow-redirects is vulnerable to Exposure of Private Personal Information to an Unauthorized Actor

Publish Date: 2022-01-10

URL: CVE-2022-0155

CVSS 3 Score Details (6.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://huntr.dev/bounties/fc524e4b-ebb6-427d-ab67-a64181020406/

Release Date: 2022-01-10

Fix Resolution (follow-redirects): 1.14.7

Direct dependency fix Resolution (opentok-solutions-logging): 1.1.1

⛑️ Automatic Remediation is available for this issue

CVE-2022-0536

Vulnerable Library - follow-redirects-1.5.10.tgz

HTTP and HTTPS modules that follow redirects.

Library home page: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/follow-redirects/package.json

Dependency Hierarchy:

  • opentok-solutions-logging-1.0.15.tgz (Root Library)
    • axios-0.19.2.tgz
      • follow-redirects-1.5.10.tgz (Vulnerable Library)

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Found in base branch: main

Vulnerability Details

Exposure of Sensitive Information to an Unauthorized Actor in NPM follow-redirects prior to 1.14.8.

Publish Date: 2022-02-09

URL: CVE-2022-0536

CVSS 3 Score Details (5.9)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: High
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0536

Release Date: 2022-02-09

Fix Resolution (follow-redirects): 1.14.8

Direct dependency fix Resolution (opentok-solutions-logging): 1.1.1

⛑️ Automatic Remediation is available for this issue

CVE-2020-28168

Vulnerable Library - axios-0.19.2.tgz

Promise based HTTP client for the browser and node.js

Library home page: https://registry.npmjs.org/axios/-/axios-0.19.2.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/axios/package.json

Dependency Hierarchy:

  • opentok-solutions-logging-1.0.15.tgz (Root Library)
    • axios-0.19.2.tgz (Vulnerable Library)

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Found in base branch: main

Vulnerability Details

Axios NPM package 0.21.0 contains a Server-Side Request Forgery (SSRF) vulnerability where an attacker is able to bypass a proxy by providing a URL that responds with a redirect to a restricted host or IP address.

Publish Date: 2020-11-06

URL: CVE-2020-28168

CVSS 3 Score Details (5.9)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: High
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2020-11-06

Fix Resolution (axios): 0.21.1

Direct dependency fix Resolution (opentok-solutions-logging): 1.1.1

⛑️ Automatic Remediation is available for this issue


⛑️ Automatic Remediation is available for this issue.

Unnecessary JSON.stringify when sending signals?

New issue checklist

General information

  • Library version(s): 2.0.15
  • iOS/Android/Browser version(s): any
  • Devices/Simulators/Machine affected: all
  • Reproducible in the demo project? (Yes/No): any
  • Related issues:

Bug report

the signal sender always stringifys the signal data, but the core library and servers are able to take Objects as is. This means that for signals send using the accelerator, an extra parse is needed that isn't necessarily when sending identical signals from non-accelerator client, or from the server.

https://github.com/opentok/accelerator-core-js/blob/master/src/core.js#L590

Expected behavior

  • data is passed through as is

Actual behavior

  • data is passed through as a string

Steps to reproduce

  • send a signal with accelerator's signal function, pass an object as data
  • receive that signal - you will need to JSON.parse the data field

Question or Feature Request

Is this by design? It doesn't appear to be a documented difference. feels like it shouldn't be happening, but maybe users of this library are used to this by now?

feature: ability to easily change videoSource to a specific device id

New issue checklist

General information

  • Library version(s): 2.0.13
  • iOS/Android/Browser version(s): chrome 73
  • Devices/Simulators/Machine affected:
  • Reproducible in the demo project? (Yes/No):
  • Related issues:

Question or Feature Request

Hi everyone, I'm using accelerator-core in order to easily setup one-to-one calls, but one of the requirements is being able to choose from a select list the device from which I want to stream video and audio, audio is not much of an issue, since I can just setAudioSource from the publisher, but setting a different video source is giving me trouble, normally I would kill the old publisher and unpublish it from the session, and publish the new one with the desired video source.

      const session = this.otCore.getSession();
      const otState = this.otCore.state();
      const activePublisher = otState.publishers.camera[Object.keys(otState.publishers.camera)[0]];
      console.log({ session, otState });
      session.unpublish(activePublisher);
      session.publish(publisher);
      console.log({ session, otState });

I'm feeling there must be a better way to do this using opentok-core since if I just use the method described above, the new publisher won't be a part of opentok-core global state, thus loosing track of it and not being able to repeat that action.

is there a way I can replace the camera publisher in opentok-core's state? I wouldn't want to recur to the cycleVideo method of the publisher as some users might have more than two cameras.

Also, thank you for building this wrapper, it has been really useful in more than one project, it's really easy to use.

Sample app is missing babel-polyfill dependency

General information

  • Library version(s):
  • iOS/Android/Browser version(s): Chrome
  • Devices/Simulators/Machine affected: Linux
  • Reproducible in the demo project? (Yes/No): Yes (this is an issue of the demo project)
  • Related issues: -

Bug report

Expected behavior

Sample react app to run.

Actual behavior

Crash displayed on console and browser.

Steps to reproduce

Instructions here: https://github.com/opentok/accelerator-core-js/blob/master/react-sample-app/README.md

Crash log? Screenshots? Videos? Sample project?

Failed to compile.

The browser also displays the same error

Error in ./src/ot-core/core.js
Module not found: 'babel-polyfill' in /home/martin/Dropbox/current/accelerator-core-js/react-sample-app/src/ot-core

 @ ./src/ot-core/core.js 15:0-25

Question or Feature Request

Need to add "babel-polyfill" to dependence list. Running npm install babel-polyfill solved the issue.

Custom streams don't trigger subscribe and unsubscribe events

New issue checklist

General information

  • Library version(s): 2.0.17
  • iOS/Android/Browser version(s): Browser
  • Devices/Simulators/Machine affected: all
  • Reproducible in the demo project? (Yes/No): yes
  • Related issues:

Bug report

When you publish a stream with a custom videoSource (startCall({videoSource:MediaStreamTrack})), the library doesn't send the subscribeToCustom and unsubscribeFromCustom events because they are not handled by the events.js file

Expected behavior

it should trigger the subscribe and unsubscribe events for the custom source

Actual behavior

it doesn't trigger the events.

Steps to reproduce

Run the sample app with otCore .startCall({ videoSource: MediaStreamTrack })

Screen sharing trigger and icon increases when I create new AccCore objects

New issue checklist

General information

@kascote @robjperez @willyaranda @jaoo @martinvol

  • Library version(s): v2.0.15
  • iOS/Android/Browser version(s): Chrome v83.0.4103.97
  • Devices/Simulators/Machine affected: Computer
  • Reproducible in the demo project? (Yes/No): Yes
  • Related issues:

Bug report

I need to change session in the app without refreshing the page and stuff which means when I do:
otCore = new AccCore(options) where options has credentials I am unable to change the session unless I basically do otCore = new AccCore(options) however that causes the screen sharing to be created/initialized again which means there is an additional icon button and it causes the chrome to prompt screenshare twice WHILST not actually working even if I press "screenshare" twice on two different popups.

How can I either remove the old AccCore or destroy it or something and remake it or just change the session the AccCore is pointing to?

I have tried to do otCore.internalState.setSession but that returns an error. I also do otCore.disconnect and otCore.endCall but that does not do anything.

The session changes succesfully and everything else seems to work fine. The only issue seems to be the additional packages such as screen share which get increased linearly with the number of times I jump sessions.

Expected behavior

Everytime I create AccCore I need the old screenshare package to remain so that I can screen share normally instead of loading it in everytime I jump sessions.

...

Actual behavior

Seeing a duplicate screen sharing package which causes the icon button to duplicate each time I remake new AccCore(options) object and when I click it causes multiple prompts and does not work in the end.

...

Steps to reproduce

Recreate otCore in componentDidMount (or anywhere). You can just duplicate these two lines:

otCore = new AccCore(options);
otCore = new AccCore(options);

...

Crash log? Screenshots? Videos? Sample project?

image
This gets duplicated when I make a new AccCore object to jump sessions and so it also causes the pop up to trigger multiple times depending on how many times I duplicated AccCore object.

...

Question or Feature Request

Is it possible for me to change sessions without remaking AccCore? Or is it possible to override certain things such as the screen sharing package duplication?

...

Here is the code below for the main logic:

jquery-3.1.1.js: 3 vulnerabilities (highest severity is: 6.1) - autoclosed

Vulnerable Library - jquery-3.1.1.js

JavaScript library for DOM operations

Library home page: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js

Path to dependency file: /test/index.html

Path to vulnerable library: /test/index.html

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (jquery version) Remediation Available
CVE-2020-11023 Medium 6.1 jquery-3.1.1.js Direct jquery - 3.5.0;jquery-rails - 4.4.0
CVE-2020-11022 Medium 6.1 jquery-3.1.1.js Direct jQuery - 3.5.0
CVE-2019-11358 Medium 6.1 jquery-3.1.1.js Direct jquery - 3.4.0

Details

CVE-2020-11023

Vulnerable Library - jquery-3.1.1.js

JavaScript library for DOM operations

Library home page: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js

Path to dependency file: /test/index.html

Path to vulnerable library: /test/index.html

Dependency Hierarchy:

  • jquery-3.1.1.js (Vulnerable Library)

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Found in base branch: main

Vulnerability Details

In jQuery versions greater than or equal to 1.0.3 and before 3.5.0, passing HTML containing elements from untrusted sources - even after sanitizing it - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code. This problem is patched in jQuery 3.5.0.

Publish Date: 2020-04-29

URL: CVE-2020-11023

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://github.com/jquery/jquery/security/advisories/GHSA-jpcq-cgw6-v4j6,https://github.com/rails/jquery-rails/blob/master/CHANGELOG.md#440

Release Date: 2020-04-29

Fix Resolution: jquery - 3.5.0;jquery-rails - 4.4.0

CVE-2020-11022

Vulnerable Library - jquery-3.1.1.js

JavaScript library for DOM operations

Library home page: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js

Path to dependency file: /test/index.html

Path to vulnerable library: /test/index.html

Dependency Hierarchy:

  • jquery-3.1.1.js (Vulnerable Library)

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Found in base branch: main

Vulnerability Details

In jQuery versions greater than or equal to 1.2 and before 3.5.0, passing HTML from untrusted sources - even after sanitizing it - to one of jQuery's DOM manipulation methods (i.e. .html(), .append(), and others) may execute untrusted code. This problem is patched in jQuery 3.5.0.

Publish Date: 2020-04-29

URL: CVE-2020-11022

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-11022

Release Date: 2020-04-29

Fix Resolution: jQuery - 3.5.0

CVE-2019-11358

Vulnerable Library - jquery-3.1.1.js

JavaScript library for DOM operations

Library home page: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js

Path to dependency file: /test/index.html

Path to vulnerable library: /test/index.html

Dependency Hierarchy:

  • jquery-3.1.1.js (Vulnerable Library)

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Found in base branch: main

Vulnerability Details

jQuery before 3.4.0, as used in Drupal, Backdrop CMS, and other products, mishandles jQuery.extend(true, {}, ...) because of Object.prototype pollution. If an unsanitized source object contained an enumerable proto property, it could extend the native Object.prototype.

Publish Date: 2019-04-20

URL: CVE-2019-11358

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11358

Release Date: 2019-04-20

Fix Resolution: jquery - 3.4.0

Auto-subscribe works unreliably in group chats

General information

  • Library version(s): 2.0.14
  • iOS/Android/Browser version(s): Google Chrome 67.0.3396.99
  • Devices/Simulators/Machine affected: Web browser
  • Reproducible in the demo project? (Yes/No): ? (I had trouble running it)

Bug report

Auto-subscribe works unreliably in group chats. It results in some people not seeing each other in certain cases.

Apparently the problem is in communication.js. It happens during startCall() method processing, when subscribeToInitialStreams() method is already running, but active flag is still false, and in such moment a new remote stream is created (streamCreated event). subscribe() is not called as active is still false, but subscribeToInitialStreams() also ignores this new stream as enumeration of streams was already started and it didn't include the new stream.

Expected behavior

Create a group video call with 4 members. All members should join approximately at the same time.
"subscribeToCamera" event should be fired for each remote stream (3 times). On each client, otCore.state().subscribers must contain 3 streams.

Actual behavior

In some cases, "subscribeToCamera" event is fired less than 3 times. otCore.state().subscribers contains less than 3 streams.

Steps to reproduce

Create a group video call with 4 members. All members should join approximately at the same time.

network test not getting support?

  • subscribe own stream
if (streamMap[streamId]) {
          // Are we already subscribing to the stream?
          var _state$all = state.all(),
              subscribers = _state$all.subscribers;
          resolve(subscribers[type][streamMap[streamId]]);
} else {
....
}
  • subscriber container not accept dom object
const container = dom.query(streamContainers('subscriber', type, connectionData, stream));

Unhelpful error when unsubscribing from already destroyed stream

When attempting to unsubscribe from a destroyed stream the action is attempted and an error is thrown.
This is an incorrect action, however I suggest either:

  • A more helpful error message reminding users not to unsubscribe from a destroyed stream
    or
  • Allow the action but nothing and return as normal

state.js:160 Uncaught (in promise) TypeError: Cannot convert undefined or null to object at State.removeSubscriber (webpack:///./~/opentok-accelerator-core/dist/sdk-wrapper/state.js?:160:47) at eval (webpack:///./~/opentok-accelerator-core/dist/sdk-wrapper/sdkWrapper.js?:375:15) at OpenTokSDK.unsubscribe (webpack:///./~/opentok-accelerator-core/dist/sdk-wrapper/sdkWrapper.js?:373:14) at eval (webpack:///./src/services/video/manager.js?:831:37) at Array.forEach (native) at eval (webpack:///./src/services/video/manager.js?:830:47)

[BUG]: Crashing page in IOS Safari 15 when start call

New issue checklist

General information

  • Library version(s): 2.0.18
  • iOS/Android/Browser version(s): Safari 15
  • Devices/Simulators/Machine affected: Iphone XR - IOS 15
  • Reproducible in the demo project? (Yes/No): Yes
  • Related issues:

Bug report

Expected behavior

Starting video call in react-sample-app

Actual behavior

Crashing page and reloading

Steps to reproduce

Click to start call button

Crash log? Screenshots? Videos? Sample project?

  • react-sample-app

Question or Feature Request

Please help with a temporary solution to fix this problem

[BUG]: Crashing page in Safari 15.01 when toggling Local Video

New issue checklist

General information

  • Library version(s): 2.0.18
  • iOS/Android/Browser version(s): Safari 15.1
  • Devices/Simulators/Machine affected: MacBook Air M1
  • Reproducible in the demo project? (Yes/No): Yes
  • Related issues:

Bug report

Expected behavior

Toggle Local Video when clicking the camera icon in react-sample-app

Actual behavior

Crashing page and reloading

Steps to reproduce

Click to start call button -> Click to button toggle video cam

Crash log? Screenshots? Videos? Sample project?

https://www.youtube.com/watch?v=NgQK6VRUWK4

  • react-sample-app

Question or Feature Request

Please help with a temporary solution to fix this problem

Virtual Background Support

Hello,

I want to implement a virtual background filter on video visit, Like what google meet, zoom app does.
Found the few examples with pure Vonage JS code but not able to merge that code using our AccCore method.
So is there any way to do that with your Acccore plugin method?

Reference link of virtual background: https://github.com/nexmo-se/opentok-filters-bodypix

Just let me know is there any method or reference code that i can implement this feature using accelerator-core-js plugin.

Thanks,

underscore-min-1.8.3.js: 1 vulnerabilities (highest severity is: 7.2) - autoclosed

Vulnerable Library - underscore-min-1.8.3.js

JavaScript's functional programming helper library.

Library home page: https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js

Path to dependency file: /test/index.html

Path to vulnerable library: /test/index.html

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (underscore-min version) Remediation Available
CVE-2021-23358 High 7.2 underscore-min-1.8.3.js Direct underscore - 1.12.1,1.13.0-2

Details

CVE-2021-23358

Vulnerable Library - underscore-min-1.8.3.js

JavaScript's functional programming helper library.

Library home page: https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js

Path to dependency file: /test/index.html

Path to vulnerable library: /test/index.html

Dependency Hierarchy:

  • underscore-min-1.8.3.js (Vulnerable Library)

Found in HEAD commit: 1e3986b7eccfbc9e60aaec7e7ee963381e7bf286

Found in base branch: main

Vulnerability Details

The package underscore from 1.13.0-0 and before 1.13.0-2, from 1.3.2 and before 1.12.1 are vulnerable to Arbitrary Code Injection via the template function, particularly when a variable property is passed as an argument as it is not sanitized.

Publish Date: 2021-03-29

URL: CVE-2021-23358

CVSS 3 Score Details (7.2)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: High
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: High
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23358

Release Date: 2021-03-29

Fix Resolution: underscore - 1.12.1,1.13.0-2

Chrome Extension issue

Chrome Extension created & Added from webStore, but always when start Screen share it shows install extension ,if i click accept it installs again but screen share not started

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.