Open primashah opened 6 years ago
@primashah Are you using the updated plugin ? https://github.com/opentok/cordova-plugin-opentok
Hello, I have the same error, but in my case I am trying to show another view on the video.
my code: .ts
none(){ this.cc = 'none'; this.style = 'none'; } block(){ this.cc = 'block'; this.style = 'block'; }
streamCreated: (event) => {
let subscriberProperties = {width:"100%",height:"91% !important"};
if(event.stream.videoType === 'screen') {
this.session.subscribe(event.stream, 'screen-preview', subscriberProperties);
this.none();
}else
{
this.session.subscribe(event.stream, 'subscriber', subOptions);
this.block();
OT.updateViews();
}
},
.html
<div id="subscriber" [class]="cc" [ngStyle]="{'display': style}">
.css
width: 100% !important;
top: 0;
height: 91% !important;
overflow: hidden;
position: fixed;
margin: 0px;
background: #0c0c0c;
left: 0px;
}
.none { width: 100% !important; top: 0; height: 91% !important; overflow: hidden; position: relative; margin: 0px !important; left: 0px; display: none !important;
}
.block { width: 100% !important; top: 0; height: 91% !important; overflow: hidden; position: relative; margin: 0px !important; left: 0px; display: block !important;
}
width: 30% !important;
height: 18% !important;
overflow: hidden;
position: fixed;
margin: 0px !important;
right: 14px;
bottom: 80px;
left: auto;
z-index: 40;
}
width: 100% !important;
top: 0;
height: 91% !important;
overflow: hidden;
position: fixed;
margin: 0px !important;
background: transparent !important;
z-index: 999;
left: 0px;
}
I am using following design and it works perfectly for me using cordova-plugin-opentok
<div id="publisher"
style="width: 30vh; height: 25vh; position: absolute; top: 0; left: 0; z-index: 1000; pointer-events:none;"></div>
<div id="subscriber"
style="width: 100%; height: 100vh; position: absolute; top: 0; left: 0; z-index: 500; pointer-events:none;"></div>
Hi , I am working on ionic 2 cordova app.
I am trying to set publisher's Video with absolute position in a way that it sits on top of subscriber video. I tried following css and code to make it work, but the publisher video is always positioned on top left corner of IPad screen:
css
The publisher properties used for initialisation are:
{
}
The subscriber properties are: {
}