mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: unused var removed
parent
d15638ed59
commit
d7b5b41ed8
|
@ -89,9 +89,8 @@ export class OpenVidu {
|
||||||
const oldWidth = publisher.stream.videoDimensions.width;
|
const oldWidth = publisher.stream.videoDimensions.width;
|
||||||
const oldHeight = publisher.stream.videoDimensions.height;
|
const oldHeight = publisher.stream.videoDimensions.height;
|
||||||
|
|
||||||
const getNewVideoDimensions = (): Promise<{newWidth: number, newHeight: number}> => {
|
const getNewVideoDimensions = (): Promise<{ newWidth: number, newHeight: number }> => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let newVideoDimensions: { newWidth: number, newHeight: number };
|
|
||||||
if (platform['isIonicIos']) {
|
if (platform['isIonicIos']) {
|
||||||
// iOS Ionic. Limitation: must get new dimensions from an existing video element already inserted into DOM
|
// iOS Ionic. Limitation: must get new dimensions from an existing video element already inserted into DOM
|
||||||
resolve({
|
resolve({
|
||||||
|
@ -102,10 +101,10 @@ export class OpenVidu {
|
||||||
// Rest of platforms
|
// Rest of platforms
|
||||||
// New resolution got from different places for Chrome and Firefox. Chrome needs a videoWidth and videoHeight of a videoElement.
|
// New resolution got from different places for Chrome and Firefox. Chrome needs a videoWidth and videoHeight of a videoElement.
|
||||||
// Firefox needs getSettings from the videoTrack
|
// Firefox needs getSettings from the videoTrack
|
||||||
let firefoxSettings = publisher.stream.getMediaStream().getVideoTracks()[0].getSettings();
|
const firefoxSettings = publisher.stream.getMediaStream().getVideoTracks()[0].getSettings();
|
||||||
const newWidth = <number>((platform.name!!.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings.width : publisher.videoReference.videoWidth);
|
const newWidth = <number>((platform.name!!.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings.width : publisher.videoReference.videoWidth);
|
||||||
const newHeight = <number>((platform.name!!.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings.height : publisher.videoReference.videoHeight);
|
const newHeight = <number>((platform.name!!.toLowerCase().indexOf('firefox') !== -1) ? firefoxSettings.height : publisher.videoReference.videoHeight);
|
||||||
resolve({newWidth, newHeight});
|
resolve({ newWidth, newHeight });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -326,7 +326,7 @@ export class Publisher extends StreamManager {
|
||||||
this.stream.isLocalStreamReadyToPublish = true;
|
this.stream.isLocalStreamReadyToPublish = true;
|
||||||
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||||
document.body.removeChild(this.videoReference);
|
document.body.removeChild(this.videoReference);
|
||||||
}
|
};
|
||||||
|
|
||||||
let interval;
|
let interval;
|
||||||
this.videoReference.onloadedmetadata = () => {
|
this.videoReference.onloadedmetadata = () => {
|
||||||
|
|
Loading…
Reference in New Issue