Skip to content

Commit 3f48b9a

Browse files
committed
Merge branch 'main' into PBE-5855-feat/react-native-video-design-v2
2 parents 00a6373 + fc20668 commit 3f48b9a

File tree

46 files changed

+2704
-1414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2704
-1414
lines changed

.github/workflows/version-and-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ env:
44
STREAM_SECRET: ${{ secrets.CLIENT_TEST_SECRET }}
55

66
on:
7-
push:
8-
branches:
9-
- main
10-
paths:
11-
- 'packages/**'
7+
# push:
8+
# branches:
9+
# - main
10+
# paths:
11+
# - 'packages/**'
1212

1313
workflow_dispatch:
1414

packages/client/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
44

5+
## [1.8.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.8.2...@stream-io/video-client-1.8.3) (2024-10-10)
6+
7+
8+
### Bug Fixes
9+
10+
* do not release track if track was not removed from stream ([#1517](https://github.com/GetStream/stream-video-js/issues/1517)) ([5bfc528](https://github.com/GetStream/stream-video-js/commit/5bfc52850c36ffe0de37e47066538a8a14dc9e01))
11+
512
## [1.8.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.8.1...@stream-io/video-client-1.8.2) (2024-10-10)
613

714

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stream-io/video-client",
3-
"version": "1.8.2",
3+
"version": "1.8.3",
44
"packageManager": "[email protected]",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.es.js",

packages/client/src/devices/InputMediaDeviceManager.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,7 @@ export abstract class InputMediaDeviceManager<
279279

280280
private stopTracks() {
281281
this.getTracks().forEach((track) => {
282-
if (track.readyState === 'live') {
283-
track.stop();
284-
// @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the track
285-
if (typeof track.release === 'function') {
286-
// @ts-expect-error
287-
track.release();
288-
}
289-
}
282+
if (track.readyState === 'live') track.stop();
290283
});
291284
}
292285

packages/client/src/devices/devices.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,6 @@ export const disposeOfMediaStream = (stream: MediaStream) => {
276276
if (!stream.active) return;
277277
stream.getTracks().forEach((track) => {
278278
track.stop();
279-
stream.removeTrack(track);
280-
// @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the track
281-
if (typeof track.release === 'function') {
282-
// @ts-expect-error
283-
track.release();
284-
}
285279
});
286280
// @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the stream
287281
if (typeof stream.release === 'function') {

packages/client/src/helpers/RNSpeechDetector.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,7 @@ export class RNSpeechDetector {
106106
if (!this.audioStream) {
107107
return;
108108
}
109-
this.audioStream.getTracks().forEach((track) => {
110-
track.stop();
111-
// @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the track
112-
if (typeof track.release === 'function') {
113-
// @ts-expect-error
114-
track.release();
115-
}
116-
});
109+
this.audioStream.getTracks().forEach((track) => track.stop());
117110
if (
118111
// @ts-expect-error release() is present in react-native-webrtc
119112
typeof this.audioStream.release === 'function'

packages/client/src/rtc/Publisher.ts

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,6 @@ export class Publisher {
316316
if (previousTrack && previousTrack !== track) {
317317
previousTrack.stop();
318318
previousTrack.removeEventListener('ended', handleTrackEnded);
319-
// @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the track
320-
if (typeof previousTrack.release === 'function') {
321-
// @ts-expect-error
322-
track.release();
323-
}
324319
track.addEventListener('ended', handleTrackEnded);
325320
}
326321
if (!track.enabled) {
@@ -342,18 +337,16 @@ export class Publisher {
342337
const transceiver = this.pc
343338
.getTransceivers()
344339
.find((t) => t === this.transceiverRegistry[trackType] && t.sender.track);
345-
const track = transceiver?.sender.track;
346-
if (track && (stopTrack ? track.readyState === 'live' : track.enabled)) {
347-
if (stopTrack) {
348-
track.stop();
349-
// @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the track
350-
if (typeof track.release === 'function') {
351-
// @ts-expect-error
352-
track.release();
353-
}
354-
} else {
355-
track.enabled = false;
356-
}
340+
if (
341+
transceiver &&
342+
transceiver.sender.track &&
343+
(stopTrack
344+
? transceiver.sender.track.readyState === 'live'
345+
: transceiver.sender.track.enabled)
346+
) {
347+
stopTrack
348+
? transceiver.sender.track.stop()
349+
: (transceiver.sender.track.enabled = false);
357350
// We don't need to notify SFU if unpublishing in response to remote soft mute
358351
if (this.state.localParticipant?.publishedTracks.includes(trackType)) {
359352
await this.notifyTrackMuteStateChanged(undefined, trackType, true);
@@ -406,13 +399,7 @@ export class Publisher {
406399
private stopPublishing = () => {
407400
this.logger('debug', 'Stopping publishing all tracks');
408401
this.pc.getSenders().forEach((s) => {
409-
const track = s.track;
410-
track?.stop();
411-
// @ts-expect-error release() is present in react-native-webrtc and must be called to dispose the track
412-
if (typeof track?.release === 'function') {
413-
// @ts-expect-error
414-
track.release();
415-
}
402+
s.track?.stop();
416403
if (this.pc.signalingState !== 'closed') {
417404
this.pc.removeTrack(s);
418405
}

packages/react-bindings/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
44

5+
## [1.1.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-1.1.2...@stream-io/video-react-bindings-1.1.3) (2024-10-10)
6+
7+
### Dependency Updates
8+
9+
* `@stream-io/video-client` updated to version `1.8.3`
510
## [1.1.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-1.1.1...@stream-io/video-react-bindings-1.1.2) (2024-10-10)
611

712
### Dependency Updates

packages/react-bindings/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stream-io/video-react-bindings",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"packageManager": "[email protected]",
55
"main": "./dist/index.cjs.js",
66
"module": "./dist/index.es.js",

packages/react-native-sdk/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
44

5+
## [1.1.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.1.4...@stream-io/video-react-native-sdk-1.1.5) (2024-10-16)
6+
7+
8+
### Bug Fixes
9+
10+
* **react-native:** set objectFit based on actual video track dimensions ([#1520](https://github.com/GetStream/stream-video-js/issues/1520)) ([44ef7d2](https://github.com/GetStream/stream-video-js/commit/44ef7d2e69a910be45b2d3a7643c3f58e0f29803))
11+
12+
## [1.1.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.1.3...@stream-io/video-react-native-sdk-1.1.4) (2024-10-10)
13+
14+
### Dependency Updates
15+
16+
* `@stream-io/video-client` updated to version `1.8.3`
17+
* `@stream-io/video-react-bindings` updated to version `1.1.3`
518
## [1.1.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.1.2...@stream-io/video-react-native-sdk-1.1.3) (2024-10-10)
619

720
### Dependency Updates

0 commit comments

Comments
 (0)