|
@@ -56,18 +56,20 @@ class RoomService extends CrudService {
|
|
|
async startrecord(data) {
|
|
|
// 接收录播参数
|
|
|
const { stream_id } = data;
|
|
|
- const arr = stream_id.split('_');
|
|
|
- const id = arr[1];
|
|
|
- console.log('id--->' + id);
|
|
|
- const res = await this.model.findById(id);
|
|
|
- if (res) {
|
|
|
- res.stream_id = stream_id;
|
|
|
- res.url = data.video_url;
|
|
|
- res.file_id = data.file_id;
|
|
|
- res.ishis = '1';
|
|
|
- await res.save();
|
|
|
+ console.log('视频回调--->' + data);
|
|
|
+ if (stream_id) {
|
|
|
+ const arr = stream_id.split('_');
|
|
|
+ const id = arr[1];
|
|
|
+ console.log('id--->' + id);
|
|
|
+ const res = await this.model.findById(id);
|
|
|
+ if (res) {
|
|
|
+ res.stream_id = stream_id;
|
|
|
+ res.url = data.video_url;
|
|
|
+ res.file_id = data.file_id;
|
|
|
+ res.ishis = '1';
|
|
|
+ await res.save();
|
|
|
+ }
|
|
|
}
|
|
|
- return res;
|
|
|
}
|
|
|
|
|
|
async updaterequid(id, requestid) {
|