Closed hash-bud closed 5 years ago
@hash-bud Can you please share some more code on how you're running this? Are you seeing an error when you initialize the publisher? Are you calling publish after the session has connected or before?
@msach22 I'm having the same issue, I'm running the Basic Video Example that is provided.
When I try to join a session in the playground, it joins but as a subscriber without video and audio.
The weird thing is that iOS prompt for camera access and shows video in the app, but is not publishing to the session.
The code is the same as the example:
startCall() {
this.session = OT.initSession(this.apiKey, this.sessionId);
this.session.on({
streamCreated: (event) => {
this.session.subscribe(event.stream, 'subscriber');
OT.updateViews();
},
streamDestroyed: (event) => {
console.log(`Stream ${event.stream.name} ended because ${event.reason}`);
OT.updateViews();
}
});
this.session.connect(this.token, () => {
this.publisher = OT.initPublisher('publisher');
this.session.publish(this.publisher);
});
}
I would appreciate your help! Thank you!
@hash-bud Thanks for sharing the code. I think the following comment should fix your issue. Please see: https://github.com/opentok/cordova-plugin-opentok/issues/138#issuecomment-466090152
I've updated the Ionic samples with the best practices. Please let me know if you have any questions! https://github.com/opentok/opentok-ionic-samples/pull/33
Bug Report
When connected from ios( ionic 3, cordova-ios 4.5.5, iphone 6, ios 12.1.2, Cordova Plugin for OpenTok 3.4.4
Current behavior
Iphone 6 after clicking start call(Don't mind the white screen. Laptop camera has a tape over it)
How playground shows the iphone stream
Steps to reproduce
Example Project
https://github.com/opentok/opentok-ionic-samples
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots