Comments (6)
Yes, we are working on a feature to replace the tracks. The issue is we have been waiting for browsers to support this feature. Now Chrome supports it too and so we are looking into it. For now you do have to unpublish and publish a whole new Publisher unfortunately.
That's a concern that you're getting black videos. Can you file your issue on Stackoverflow and we can find an answer for you there. https://stackoverflow.com/questions/tagged/tokbox+or+opentok
from opentok-web-samples.
2.14 now has cycleVideo() which lets you switch between cameras without having to unpublish and publish again. https://tokbox.com/developer/sdks/js/reference/Publisher.html#cycleVideo
from opentok-web-samples.
This would be really nice, because I'm stuck with this atm.
I've created a stream using OT.getUserMedia and I'm passing those tracks into a new OT.Publisher. The problem is when I unpublish this publisher destroy it and create a new one with different tracks then it doesn't publish anymore. I'm just getting black videos.
I'd like if I didn't need to unpublish the publisher at all but I couldn't find a way how to add and remove tracks from the publisher.
Here is what happens to me:
Here are some code samples.
startStreaming () {
const { session, properties, errorHandler, publish } = this
console.log('properties', properties)
this.$nextTick(() => {
this.publisher = OT.initPublisher(properties, errorHandler)
this.publisher.on('streamCreated', this.handleStreamCreated)
this.publisher.on('streamDestroyed', this.handleStreamDestroyed)
this.publisher.on('audioLevelUpdated', this.handleAudioLevelChange)
session.on('sessionConnected', publish)
if (session.isConnected()) { publish() }
})
},
publish () {
this.session.publish(this.publisher, this.errorHandler)
},
stopStreaming () {
this.session.off('sessionConnected')
this.publisher.off('streamCreated')
this.publisher.off('streamDestroyed')
this.session.unpublish(this.publisher)
if (this.publisher) {
this.publisher.destroy()
}
},
from opentok-web-samples.
@aullman cool I'll put it on our roadmap!
from opentok-web-samples.
@aullman we've just discovered that it's not possible to pass a new set of device ids. Unfortunately we cannot use this function.
from opentok-web-samples.
When we use OT.getUserMedia, how do we disconnect the call without refreshing the page? It seems that session.disconnect(publisher) does not work when there is OT.getUserMedia.
from opentok-web-samples.
Related Issues (20)
- Publish video through OpenTok SDK HOT 1
- How can we implement accelerator-core-js in Angular?
- Video turn on/off option is not displaying on subscriber screen
- getting error while try this zip in 13.2 HOT 2
- I have a problem in @opentok/client 2.22.1 when subscribing to a stream created
- react-16.2.0.tgz: 5 vulnerabilities (highest severity is: 7.5) - autoclosed HOT 1
- url-parse-1.4.3.tgz: 7 vulnerabilities (highest severity is: 9.8) - autoclosed HOT 1
- electron-2.0.2.tgz: 25 vulnerabilities (highest severity is: 9.9) - autoclosed HOT 1
- react-dom-16.2.0.tgz: 1 vulnerabilities (highest severity is: 6.1) - autoclosed HOT 1
- core-6.1.8.tgz: 1 vulnerabilities (highest severity is: 5.4) - autoclosed HOT 1
- jquery-3.2.1.min.js: 3 vulnerabilities (highest severity is: 6.1) - autoclosed HOT 1
- opentok-react-0.7.0.tgz: 7 vulnerabilities (highest severity is: 9.1) - autoclosed HOT 1
- electron-17.0.0-beta.1.tgz: 5 vulnerabilities (highest severity is: 9.8) - autoclosed HOT 1
- react-scripts-1.0.16.tgz: 97 vulnerabilities (highest severity is: 9.8) - autoclosed HOT 1
- apply background filter to a video call HOT 1
- subscriber.setAudioVolume is not a function
- electron-21.2.2.tgz: 1 vulnerabilities (highest severity is: 5.3) - autoclosed HOT 1
- OT.getDevices() get speakers HOT 1
- Inbound Audio does not work with VOIP sample HOT 3
- vue sample ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentok-web-samples.