Skip to content

Commit

Permalink
fix(RTC): Add function declaration to JitsiTrack.
Browse files Browse the repository at this point in the history
RN clients throw a function undefined error otherwise.
  • Loading branch information
jallamsetty1 committed May 24, 2022
1 parent 42f5b4b commit 7d3f13c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
10 changes: 10 additions & 0 deletions modules/RTC/JitsiTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,16 @@ export default class JitsiTrack extends EventEmitter {
return null;
}

/**
* Returns the streaming status of the track.
*
* @returns {string} the streaming status <tt>TrackStreamingStatus</tt> of the track. Returns null if
- * trackStreamingStatusImpl hasn't been initialized.
*/
getTrackStreamingStatus() {
// Should be defined by the classes that are extending JitsiTrack.
}

/**
* Checks whether the MediaStream is active/not ended.
* When there is no check for active we don't have information and so
Expand Down
9 changes: 0 additions & 9 deletions types/auto/modules/RTC/JitsiRemoteTrack.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,6 @@ export default class JitsiRemoteTrack extends JitsiTrack {
* @param {string} state the current track streaming state. {@link TrackStreamingStatus}.
*/
_setTrackStreamingStatus(status: any): void;
/**
* Returns track's streaming status.
*
* @returns {string} the streaming status <tt>TrackStreamingStatus</tt> of the track. Returns null
* if trackStreamingStatusImpl hasn't been initialized.
*
* {@link TrackStreamingStatus}.
*/
getTrackStreamingStatus(): string;
/**
* Clears the timestamp of when the track entered forwarded sources.
*/
Expand Down
7 changes: 7 additions & 0 deletions types/auto/modules/RTC/JitsiTrack.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ export default class JitsiTrack extends EventEmitter {
* @returns {string|null} id of the track or null if this is fake track.
*/
getId(): string | null;
/**
* Returns the streaming status of the track.
*
* @returns {string} the streaming status <tt>TrackStreamingStatus</tt> of the track. Returns null if
- * trackStreamingStatusImpl hasn't been initialized.
*/
getTrackStreamingStatus(): string;
/**
* Checks whether the MediaStream is active/not ended.
* When there is no check for active we don't have information and so
Expand Down

0 comments on commit 7d3f13c

Please sign in to comment.