mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: bug fix on streamPropertyChanged event when mobile rotation
parent
220b82d501
commit
2c8e4afa48
|
@ -289,6 +289,9 @@ export class Publisher extends StreamManager {
|
||||||
mediaStream.getVideoTracks()[0].enabled = !!this.stream.outboundStreamOpts.publisherProperties.publishVideo;
|
mediaStream.getVideoTracks()[0].enabled = !!this.stream.outboundStreamOpts.publisherProperties.publishVideo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.videoReference = document.createElement('video');
|
||||||
|
this.videoReference.srcObject = mediaStream;
|
||||||
|
|
||||||
this.stream.setMediaStream(mediaStream);
|
this.stream.setMediaStream(mediaStream);
|
||||||
if (!this.stream.displayMyRemote()) {
|
if (!this.stream.displayMyRemote()) {
|
||||||
// When we are subscribed to our remote we don't still set the MediaStream object in the video elements to
|
// When we are subscribed to our remote we don't still set the MediaStream object in the video elements to
|
||||||
|
@ -323,8 +326,6 @@ export class Publisher extends StreamManager {
|
||||||
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
this.stream.ee.emitEvent('stream-ready-to-publish', []);
|
||||||
} else {
|
} else {
|
||||||
// With screen share, video dimension must be got from a video element (onloadedmetadata event)
|
// With screen share, video dimension must be got from a video element (onloadedmetadata event)
|
||||||
this.videoReference = document.createElement('video');
|
|
||||||
this.videoReference.srcObject = mediaStream;
|
|
||||||
this.videoReference.onloadedmetadata = () => {
|
this.videoReference.onloadedmetadata = () => {
|
||||||
this.stream.videoDimensions = {
|
this.stream.videoDimensions = {
|
||||||
width: this.videoReference.videoWidth,
|
width: this.videoReference.videoWidth,
|
||||||
|
|
|
@ -37,6 +37,7 @@ export class ConnectionEvent extends Event {
|
||||||
* - "disconnect": the remote user has called `Session.disconnect()`
|
* - "disconnect": the remote user has called `Session.disconnect()`
|
||||||
* - "forceDisconnectByUser": the remote user has been evicted from the Session by other user calling `Session.forceDisconnect()`
|
* - "forceDisconnectByUser": the remote user has been evicted from the Session by other user calling `Session.forceDisconnect()`
|
||||||
* - "forceDisconnectByServer": the remote user has been evicted from the Session by the application
|
* - "forceDisconnectByServer": the remote user has been evicted from the Session by the application
|
||||||
|
* - "sessionClosedByServer": the Session has been closed by the application
|
||||||
* - "networkDisconnect": the remote user network connection has dropped
|
* - "networkDisconnect": the remote user network connection has dropped
|
||||||
*
|
*
|
||||||
* For 'connectionCreated' empty string
|
* For 'connectionCreated' empty string
|
||||||
|
|
Loading…
Reference in New Issue