diff --git a/EnotaryoPH/EnotaryoPH.Data/Entities/LawyerVideoConferenceSchedule.cs b/EnotaryoPH/EnotaryoPH.Data/Entities/LawyerVideoConferenceSchedule.cs index ff5f2be..94be60f 100644 --- a/EnotaryoPH/EnotaryoPH.Data/Entities/LawyerVideoConferenceSchedule.cs +++ b/EnotaryoPH/EnotaryoPH.Data/Entities/LawyerVideoConferenceSchedule.cs @@ -5,6 +5,12 @@ namespace EnotaryoPH.Data.Entities [Table("LawyerVideoConferenceSchedule")] public class LawyerVideoConferenceSchedule { + [Column("ServerCallID")] + public string? ServerCallID { get; set; } + + [Column("RecordingID")] + public string? RecordingID { get; set; } + [Column("CreatedOn")] public DateTime? CreatedOn { get; set; } diff --git a/EnotaryoPH/EnotaryoPH.Web/Assets/js/Communication/VideoCall/_VideoCall.js b/EnotaryoPH/EnotaryoPH.Web/Assets/js/Communication/VideoCall/_VideoCall.js index ad4dc7f..c9d5901 100644 --- a/EnotaryoPH/EnotaryoPH.Web/Assets/js/Communication/VideoCall/_VideoCall.js +++ b/EnotaryoPH/EnotaryoPH.Web/Assets/js/Communication/VideoCall/_VideoCall.js @@ -19,6 +19,7 @@ class VideoCall { this.onCreateLocalVideoStream = null; this.remoteParticipantStateChanged = null; this.remoteVideoIsAvailableChanged = null; + this.onGetServerCallID = null; } async init(userAccessToken, options) { @@ -42,13 +43,6 @@ class VideoCall { this.localVideoStream = new LocalVideoStream(cameras[0]); } - async startLocalVideo() { - if (this.localVideoStream) { - //const localVideoOptions = new VideoStreamOptions(); - await this.callAgent.startCall([this.callAgent.identity], { video: [this.localVideoStream] }); - } - } - stopLocalVideo() { if (this.call) { this.call.stopVideo(this.localVideoStream); @@ -67,6 +61,21 @@ class VideoCall { const roomCallLocator = { roomId: roomId }; let call = this.callAgent.join(roomCallLocator, { videoOptions }); this.subscribeToCall(call); + + this.callAgent.on('callsUpdated', e => { + e.added.forEach((addedCall) => { + addedCall.on('stateChanged', () => { + if (addedCall.state === 'Connected') { + debugger; + addedCall.info.getServerCallId().then(result => { + this.onGetServerCallID?.(result); + }).catch(err => { + console.log(err); + }); + } + }); + }); + }); } catch (error) { console.error(error); } diff --git a/EnotaryoPH/EnotaryoPH.Web/EnotaryoPH.Web.csproj b/EnotaryoPH/EnotaryoPH.Web/EnotaryoPH.Web.csproj index 5dce866..71cda82 100644 --- a/EnotaryoPH/EnotaryoPH.Web/EnotaryoPH.Web.csproj +++ b/EnotaryoPH/EnotaryoPH.Web/EnotaryoPH.Web.csproj @@ -8,6 +8,7 @@ + diff --git a/EnotaryoPH/EnotaryoPH.Web/Pages/Participant/VideoCall/Room.cshtml b/EnotaryoPH/EnotaryoPH.Web/Pages/Participant/VideoCall/Room.cshtml index 16dc300..5ac0d51 100644 --- a/EnotaryoPH/EnotaryoPH.Web/Pages/Participant/VideoCall/Room.cshtml +++ b/EnotaryoPH/EnotaryoPH.Web/Pages/Participant/VideoCall/Room.cshtml @@ -77,7 +77,7 @@ @section Scripts { - +