Unable to get stream info on Stream Status Unpublished

Taylor

Member
Hello

I recently updated the WebCallServer to the latest Amazon version (5.2.629) and began testing the stream publishing.

However when I finish the stream I get an error on the browser saying that the video file cannot be found.
In the Stream Recording demo page on the media server it's quite similar. I can safely publish and stop the video but the demo page doesn't pick up that the video has just been published (no video is shown to be played back).

After some inspecting it turns out that the method getRecordInfo() isn't returning the stream name anymore, even though it's being called on the event STREAM_STATUS.UNPUBLISHED

JavaScript:
session.createStream({
    name: streamName,
    display: localVideo,
    constraints: _getConstraints(),
    record: true
}).on(STREAM_STATUS.UNPUBLISHED, _onStreamUnpublished)

function _onStreamUnpublished(stream) {
    _onVideoPublished(stream.getRecordInfo());
}
I've also tested this on the latest WCS version (5.2.654) but I get the same issue.


I have figured out a temporary workaround but I don't see being reliable.

In the media server's file 'flashphoner.properties' I have stream_record_policy_template={streamName}
, that way the stream name is the video filename. But I am unable to determine the video format since, while most streams are saved as mp4, I've had some videos be in different formats like webm.

Any help with this would be greatly appreciated.

Cheers
 

Max

Administrator
Staff member
Good day.
We already work on this issue in ticket WCS-2759 and let you know when fix it.
As workaround, you can use template stream_record_policy_template={streamName} and REST query /rest-api/recorder/find_all. It returns currently active recordings list with file names, for example
Code:
[
    {
        "fileName": "stream1.mp4",
        "mediaSessionId": "5a072377-73c1-4caf-abd3"
    }
]
so you can find the file name by stream name. You should send this query before recording is stopped.
 
Top