The ROOM_EVENT.PUBLISHED event occurred, but the video cannot be played.

hyuk

Member
Hi, It may be a slightly vague question.

I tested it on two flahphoner servers, but the results are wrong.

Server A - 5.2.795 WCS, coturn server
Server B - 5.2.945 WCS, coturn server

When the "ROOM_EVENT.PUBLISHED" event occurs on the video receiving side, the participant's stream is played.

In server A, the video was played at once when the event occurred, but in server B, when "participant.getStream()[0].play(...)" was executed, "STREAM_STATUS.PLAYING" status was displayed, but it was not actually played normally.
Another strange thing is that after the ROOM_EVENT.PUBLISHED event occurs, when the video is played after a delay of 1 second, the video is played normally.

If you play a video that has already been transmitted for quite some time, it will play without any problem.

What's the problem?


For reference, only the WCS server is different, but the client was tested with the same source on the local PC.
 

Max

Administrator
Staff member
Good day.
Another strange thing is that after the ROOM_EVENT.PUBLISHED event occurs, when the video is played after a delay of 1 second, the video is played normally.
Seems like the client has a channels of different quality to server A and server B.
Please try to use a lower resolution/bitrate to publish a stream
Code:
    var constraints = {
        audio: true,
        video: {
            width: 320,
            height: 240,
            maxBitrate: 200
        }
    };
    ...
    room.publish({
        display: display,
        constraints: constraints,
        record: false,
        receiveVideo: false,
        receiveAudio: false
        ...
    });
Also, you can set up periodic keyframe request from browser
Code:
periodic_fir_request=true
periodic_fir_request_interval=2000
In this case, server will request keyframe every 2 seconds, so maximum playback delay should be no more than 2 seconds.
Please also note that if you use a TURN server, media traffic actually goes via TCP between client and coturn. TCP may add delay up to 3 seconds.
 
Top