Skip to content

Commit

Permalink
Merge branch 'main' of github.com:whereby/browser-sdk into pontusfage…
Browse files Browse the repository at this point in the history
…rstrom/cob-305-error-establishing-peer-connection-in-p2p-on-active
  • Loading branch information
pnts-se-whereby committed Jan 29, 2024
2 parents 360e6a8 + 82c7f1b commit 30f0103
Show file tree
Hide file tree
Showing 28 changed files with 374 additions and 332 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/dependabot-pr-linear-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Dependabot PR -> Linear issue
on:
pull_request:
branches: [main]
types: [opened]
jobs:
create_linear_issue_if_needed:
name: "Create Linear issue if needed"
uses: whereby/github-actions/.github/workflows/[email protected]
secrets:
linear_api_key: ${{ secrets.LINEAR_API_KEY }}
with:
linear_team_id: ${{ vars.LINEAR_PANDA_TEAM_ID }}
linear_state_id: ${{ vars.LINEAR_TRIAGE_STATE_ID }}
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1

- uses: jakejarvis/s3-sync-action@master
- uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: whereby-cdn
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "es-west-1"
SOURCE_DIR: "dist/"
SOURCE_DIR: "dist/cdn/"
DEST_DIR: "embed/"

- name: Invalidate cloudfront publication
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,18 @@ export default MyComponent;
> Although we have just higlighted two combinations of how to load and use the
> web component, it should be possible to use this library with all the major
> frontend frameworks.
## Migrating from v1 to v2

Migration from v1 to v2 is only relevant for users of the `<whereby-embed />`
web component. The following changes are necessary when upgrading to v2:

- If you import the web component in your app, you need to add `/embed` to the
import path, like so `import "whereby.com/browser-sdk/embed"`
- If you load the web component using a `<script>` tag, the src needs to be
changed to `https://cdn.srv.whereby.com/embed/v2-embed.js`. In addition, the
`type="module"` attribute is no longer required and can be removed.

The functionality of the web component should be exactly as the latest version
on the v1 branch, but a TypeScript definition is now available for projects
using this language.
2 changes: 1 addition & 1 deletion examples/embed-element-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@types/node": "^16.18.61",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@whereby.com/browser-sdk": "2.0.0-beta3",
"@whereby.com/browser-sdk": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
Expand Down
1 change: 1 addition & 0 deletions examples/embed-element-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function App() {
minimal="on"
room={roomUrl}
style={{ width: "100%", height: "100vh" }}
// @ts-ignore
ref={elmRef}
/>
</div>
Expand Down
47 changes: 39 additions & 8 deletions examples/embed-element-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,16 @@
schema-utils "^3.0.0"
source-map "^0.7.3"

"@reduxjs/toolkit@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-2.0.1.tgz#0a5233c1e35c1941b03aece39cceade3467a1062"
integrity sha512-fxIjrR9934cmS8YXIGd9e7s1XRsEU++aFc9DVNMFMRTM5Vtsg2DCRMj21eslGtDt43IUf9bJL3h5bwUlZleibA==
dependencies:
immer "^10.0.3"
redux "^5.0.0"
redux-thunk "^3.1.0"
reselect "^5.0.1"

"@rollup/plugin-babel@^5.2.0":
version "5.3.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283"
Expand Down Expand Up @@ -2414,13 +2424,14 @@
"@webassemblyjs/ast" "1.11.6"
"@xtuc/long" "4.2.2"

"@whereby.com/[email protected]-beta3":
version "2.0.0-beta3"
resolved "https://registry.yarnpkg.com/@whereby.com/browser-sdk/-/browser-sdk-2.0.0-beta3.tgz#d3c2275adfd969db14cfb6b7a481be2c4140bd3b"
integrity sha512-L9n/lRS2eoAd33jXslQ/DN7BV/FScjukG12xH6wT9OyRs4T64zWQPNi1h1gH1F2bmiUcZ7oOEagbvsoXw+vAzg==
"@whereby.com/browser-sdk@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@whereby.com/browser-sdk/-/browser-sdk-2.0.0.tgz#3751a3ea5c7b64c4626cc03cddd0042a588415ba"
integrity sha512-8Vh14T+jzpkqM9waiZapyD0rasXyLoEQH9rmXq4jNXDcYU/LbJMig/ohLORHZVTg6ONvtEqSQxMnzGu8xYPANg==
dependencies:
"@reduxjs/toolkit" "^2.0.1"
"@swc/helpers" "^0.3.13"
"@whereby/jslib-media" whereby/jslib-media.git#1.4.1
"@whereby/jslib-media" "github:whereby/jslib-media#1.4.1"
axios "^1.2.3"
btoa "^1.2.1"
events "^3.3.0"
Expand Down Expand Up @@ -4663,9 +4674,9 @@ flatted@^3.2.9:
integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==

follow-redirects@^1.0.0, follow-redirects@^1.15.0:
version "1.15.3"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a"
integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==
version "1.15.5"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020"
integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==

for-each@^0.3.3:
version "0.3.3"
Expand Down Expand Up @@ -5197,6 +5208,11 @@ ignore@^5.2.0:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==

immer@^10.0.3:
version "10.0.3"
resolved "https://registry.yarnpkg.com/immer/-/immer-10.0.3.tgz#a8de42065e964aa3edf6afc282dfc7f7f34ae3c9"
integrity sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==

immer@^9.0.7:
version "9.0.21"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176"
Expand Down Expand Up @@ -7865,6 +7881,16 @@ recursive-readdir@^2.2.2:
dependencies:
minimatch "^3.0.5"

redux-thunk@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-3.1.0.tgz#94aa6e04977c30e14e892eae84978c1af6058ff3"
integrity sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==

redux@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/redux/-/redux-5.0.1.tgz#97fa26881ce5746500125585d5642c77b6e9447b"
integrity sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==

reflect.getprototypeof@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz#aaccbf41aca3821b87bb71d9dcbc7ad0ba50a3f3"
Expand Down Expand Up @@ -7975,6 +8001,11 @@ reraf@^1.1.1:
resolved "https://registry.yarnpkg.com/reraf/-/reraf-1.1.1.tgz#c75584660edd9b6ee3c31eeb694d938f529b7042"
integrity sha512-uwOsqdTxJAQCxqvJF4Kiz4orwO9B8OBJkGeW7/NWNirapPutgig/3xU3emruvfwUbb+t51V0zHtNw6d83RDlJQ==

reselect@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/reselect/-/reselect-5.1.0.tgz#c479139ab9dd91be4d9c764a7f3868210ef8cd21"
integrity sha512-aw7jcGLDpSgNDyWBQLv2cedml85qd95/iszJjN988zX1t7AVRJi19d9kto5+W7oCfQ94gyo40dVbT6g2k4/kXg==

resolve-cwd@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
Expand Down
2 changes: 1 addition & 1 deletion examples/quiz-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@types/node": "^17.0.45",
"@types/react": "^18.0.38",
"@types/react-dom": "^18.0.11",
"@whereby.com/browser-sdk": "2.0.0-beta3",
"@whereby.com/browser-sdk": "^2.0.0",
"framer-motion": "^10.12.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
20 changes: 12 additions & 8 deletions examples/quiz-app/src/components/Participants/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,18 @@ const Participants = ({ roomConnection, quizState, variant = "default", screen =

return (
<motion.div {...animationProps} key={id}>
<VideoTile
muted={localParticipant?.id === id}
stream={stream}
name={`${displayName} - ${scores[id] || 0} points`}
hasAnswered={hasParticipantAnswered}
roundResult={roundResults[id]}
variant={tileSizeVariant}
/>
{stream ? (
<VideoTile
muted={localParticipant?.id === id}
stream={stream}
name={`${displayName} - ${scores[id] || 0} points`}
hasAnswered={hasParticipantAnswered}
roundResult={roundResults[id]}
variant={tileSizeVariant}
/>
) : (
<div>No media</div>
)}
</motion.div>
);
})}
Expand Down
1 change: 0 additions & 1 deletion examples/quiz-app/src/views/Game/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const Game = ({ localMedia, displayName, roomUrl }: GameProps) => {
const roomConnection = useRoomConnection(roomUrl, {
localMedia,
displayName,
logger: console,
});

const { state: roomState } = roomConnection;
Expand Down
46 changes: 39 additions & 7 deletions examples/quiz-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2561,6 +2561,16 @@
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==

"@reduxjs/toolkit@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-2.0.1.tgz#0a5233c1e35c1941b03aece39cceade3467a1062"
integrity sha512-fxIjrR9934cmS8YXIGd9e7s1XRsEU++aFc9DVNMFMRTM5Vtsg2DCRMj21eslGtDt43IUf9bJL3h5bwUlZleibA==
dependencies:
immer "^10.0.3"
redux "^5.0.0"
redux-thunk "^3.1.0"
reselect "^5.0.1"

"@rollup/plugin-babel@^5.2.0":
version "5.3.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283"
Expand Down Expand Up @@ -3362,11 +3372,12 @@
"@webassemblyjs/ast" "1.11.6"
"@xtuc/long" "4.2.2"

"@whereby.com/[email protected]-beta3":
version "2.0.0-beta3"
resolved "https://registry.yarnpkg.com/@whereby.com/browser-sdk/-/browser-sdk-2.0.0-beta3.tgz#d3c2275adfd969db14cfb6b7a481be2c4140bd3b"
integrity sha512-L9n/lRS2eoAd33jXslQ/DN7BV/FScjukG12xH6wT9OyRs4T64zWQPNi1h1gH1F2bmiUcZ7oOEagbvsoXw+vAzg==
"@whereby.com/browser-sdk@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@whereby.com/browser-sdk/-/browser-sdk-2.0.0.tgz#3751a3ea5c7b64c4626cc03cddd0042a588415ba"
integrity sha512-8Vh14T+jzpkqM9waiZapyD0rasXyLoEQH9rmXq4jNXDcYU/LbJMig/ohLORHZVTg6ONvtEqSQxMnzGu8xYPANg==
dependencies:
"@reduxjs/toolkit" "^2.0.1"
"@swc/helpers" "^0.3.13"
"@whereby/jslib-media" whereby/jslib-media.git#1.4.1
axios "^1.2.3"
Expand All @@ -3376,6 +3387,7 @@

"@whereby/jslib-media@whereby/jslib-media.git#1.4.1":
version "1.4.1"
uid abc55b7e2d3af9c71cb3f3a2953291bb79725064
resolved "https://codeload.github.com/whereby/jslib-media/tar.gz/abc55b7e2d3af9c71cb3f3a2953291bb79725064"
dependencies:
events "^3.3.0"
Expand Down Expand Up @@ -5676,9 +5688,9 @@ focus-lock@^1.0.0:
tslib "^2.0.3"

follow-redirects@^1.0.0, follow-redirects@^1.15.0:
version "1.15.3"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a"
integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==
version "1.15.5"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020"
integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==

for-each@^0.3.3:
version "0.3.3"
Expand Down Expand Up @@ -6238,6 +6250,11 @@ ignore@^5.2.0:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==

immer@^10.0.3:
version "10.0.3"
resolved "https://registry.yarnpkg.com/immer/-/immer-10.0.3.tgz#a8de42065e964aa3edf6afc282dfc7f7f34ae3c9"
integrity sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==

immer@^9.0.7:
version "9.0.21"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176"
Expand Down Expand Up @@ -8988,6 +9005,16 @@ recursive-readdir@^2.2.2:
dependencies:
minimatch "^3.0.5"

redux-thunk@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-3.1.0.tgz#94aa6e04977c30e14e892eae84978c1af6058ff3"
integrity sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==

redux@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/redux/-/redux-5.0.1.tgz#97fa26881ce5746500125585d5642c77b6e9447b"
integrity sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==

reflect.getprototypeof@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.4.tgz#aaccbf41aca3821b87bb71d9dcbc7ad0ba50a3f3"
Expand Down Expand Up @@ -9098,6 +9125,11 @@ reraf@^1.1.1:
resolved "https://registry.yarnpkg.com/reraf/-/reraf-1.1.1.tgz#c75584660edd9b6ee3c31eeb694d938f529b7042"
integrity sha512-uwOsqdTxJAQCxqvJF4Kiz4orwO9B8OBJkGeW7/NWNirapPutgig/3xU3emruvfwUbb+t51V0zHtNw6d83RDlJQ==

reselect@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/reselect/-/reselect-5.1.0.tgz#c479139ab9dd91be4d9c764a7f3868210ef8cd21"
integrity sha512-aw7jcGLDpSgNDyWBQLv2cedml85qd95/iszJjN988zX1t7AVRJi19d9kto5+W7oCfQ94gyo40dVbT6g2k4/kXg==

resolve-cwd@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
Expand Down
2 changes: 1 addition & 1 deletion examples/telehealth-tutorial-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@types/node": "^16.18.58",
"@types/react": "^18.2.25",
"@types/react-dom": "^18.2.11",
"@whereby.com/browser-sdk": "2.0.0-beta1",
"@whereby.com/browser-sdk": "^2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/telehealth-tutorial-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function App() {
const chatMessageBottomRef = React.useRef<HTMLDivElement>(null);

const roomConnection = useRoomConnection(ROOM_URL, {
localMediaConstraints: {
localMediaOptions: {
audio: true,
video: true,
},
Expand Down
Loading

0 comments on commit 30f0103

Please sign in to comment.