Skip to content

Commit

Permalink
openvidu-browser: remove unused parameter in Publisher#getVideoDimens…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
pabloFuente committed May 10, 2022
1 parent 46ba134 commit a38d6b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion openvidu-browser/src/OpenVidu/OpenVidu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ export class OpenVidu {
if (attempts > MAX_ATTEMPTS) {
clearTimeout(repeatUntilChangeOrMaxAttempts);
}
publisher.getVideoDimensions(publisher.stream.getMediaStream()).then(newDimensions => {
publisher.getVideoDimensions().then(newDimensions => {
if (newDimensions.width !== oldWidth || newDimensions.height !== oldHeight) {
clearTimeout(repeatUntilChangeOrMaxAttempts);
this.sendVideoDimensionsChangedEvent(publisher, reason, oldWidth, oldHeight, newDimensions.width, newDimensions.height);
Expand Down
6 changes: 3 additions & 3 deletions openvidu-browser/src/OpenVidu/Publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export class Publisher extends StreamManager {

if (this.stream.isSendVideo()) {
// Has video track
this.getVideoDimensions(mediaStream).then(dimensions => {
this.getVideoDimensions().then(dimensions => {
this.stream.videoDimensions = {
width: dimensions.width,
height: dimensions.height
Expand Down Expand Up @@ -670,7 +670,7 @@ export class Publisher extends StreamManager {
* and then try to use MediaStreamTrack.getSettingsMethod(). If not available, then we
* use the HTMLVideoElement properties videoWidth and videoHeight
*/
getVideoDimensions(mediaStream: MediaStream): Promise<{ width: number, height: number }> {
getVideoDimensions(): Promise<{ width: number, height: number }> {
return new Promise((resolve, reject) => {

// Ionic iOS and Safari iOS supposedly require the video element to actually exist inside the DOM
Expand Down Expand Up @@ -770,7 +770,7 @@ export class Publisher extends StreamManager {
mediaStream.removeTrack(removedTrack);
removedTrack.stop();
mediaStream.addTrack(track);
if (track.kind === 'video' && this.stream.isLocalStreamPublished) {
if (track.kind === 'video' && this.stream.isLocalStreamPublished && updateLastConstraints) {
this.openvidu.sendNewVideoDimensionsIfRequired(this, 'trackReplaced', 50, 30);
this.session.sendVideoData(this.stream.streamManager, 5, true, 5);
}
Expand Down

0 comments on commit a38d6b4

Please sign in to comment.