openvidu-browser: bug fix on streamPropertyChanged event when mobile rotation

pull/87/merge
pabloFuente 2018-07-10 12:37:12 +02:00
parent 220b82d501
commit 2c8e4afa48
2 changed files with 4 additions and 2 deletions

View File

@ -289,6 +289,9 @@ export class Publisher extends StreamManager {
mediaStream.getVideoTracks()[0].enabled = !!this.stream.outboundStreamOpts.publisherProperties.publishVideo;
}
this.videoReference = document.createElement('video');
this.videoReference.srcObject = mediaStream;
this.stream.setMediaStream(mediaStream);
if (!this.stream.displayMyRemote()) {
// 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', []);
} else {
// 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.stream.videoDimensions = {
width: this.videoReference.videoWidth,

View File

@ -37,6 +37,7 @@ export class ConnectionEvent extends Event {
* - "disconnect": the remote user has called `Session.disconnect()`
* - "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
* - "sessionClosedByServer": the Session has been closed by the application
* - "networkDisconnect": the remote user network connection has dropped
*
* For 'connectionCreated' empty string