stather-it-consulting
Member
Hi,
-Version: 5.5.2-1043 (Amazon AWS)
-WebSDK: 2.0.202
I use Flashphoner for audio/video and audio-only streaming. Currently i have the problem that when i use audio-only streaming, each participant uses 1MBit/s of bandwidth which is a lot for audio only. I suspect that the video is streamed even though turned off in my Vue.js app.
In my vue component, i use audio-only streaming like this:
init the connection
start broadcasting (if audio and video should be used this.appSettings.url_stream_type is 'stream_video', on audio only, the default constraints are used
What am i doing wrong (and how can i check on the server that audio-only streaming is currently active)?
Best,
Thomas
-Version: 5.5.2-1043 (Amazon AWS)
-WebSDK: 2.0.202
I use Flashphoner for audio/video and audio-only streaming. Currently i have the problem that when i use audio-only streaming, each participant uses 1MBit/s of bandwidth which is a lot for audio only. I suspect that the video is streamed even though turned off in my Vue.js app.
In my vue component, i use audio-only streaming like this:
init the connection
Code:
initApi() {
Flashphoner.init({});
this.session = Flashphoner.createSession({
urlServer: this.appSettings.url_stream
}).on(this.SESSION_STATUS.ESTABLISHED, () => {
this.status = 'stopped'
}).on(this.SESSION_STATUS.DISCONNECTED, () => {
this.status = 'disconnected'
}).on(this.SESSION_STATUS.FAILED, () => {
this.status = 'disconnected'
});
},
start broadcasting (if audio and video should be used this.appSettings.url_stream_type is 'stream_video', on audio only, the default constraints are used
Code:
publishStream() {
let constraints = {
audio: {
deviceId: this.audioSource,
bitrate: this.streamSettings.audioBitrate
}
}
if (this.appSettings.url_stream_type === 'stream_video') {
constraints = {
...constraints,
video: {
deviceId: this.videoSource,
maxBitrate: this.streamSettings.videoBitrateMax,
minBitrate: this.streamSettings.videoBitrateMin,
width: this.getVideoWidth,
height: this.getVideoHeight
}
}
}
if (this.audioSource === 'disabled') {
constraints.audio = false
}
if (this.videoSource === 'disabled') {
constraints.video = false
}
this.stream = this.session.createStream({
name: this.appSettings.url_stream_name,
display: document.getElementById('publish'),
constraints
}).on(this.STREAM_STATUS.PUBLISHING, () => {
this.stream.setMicrophoneGain(this.volume)
this.statsIntervalID = setInterval(() => {
this.loadStats()
}, 1000)
this.status = 'broadcasting'
}).on(this.STREAM_STATUS.FAILED, function () {
this.status = 'error'
this.stopPublish()
})
this.stream.publish();
}
What am i doing wrong (and how can i check on the server that audio-only streaming is currently active)?
Best,
Thomas
Last edited: