change video streaming design

merge-requests/733/head
mosazaid 5 years ago
parent ad773c5e56
commit 1834d9f776

@ -45,8 +45,9 @@ class MainActivity : FlutterFragmentActivity(), MethodChannel.MethodCallHandler
val tokenID = call.argument<String>("TokenID") val tokenID = call.argument<String>("TokenID")
val generalId = call.argument<String>("generalId") val generalId = call.argument<String>("generalId")
val doctorId = call.argument<Int>("DoctorId") val doctorId = call.argument<Int>("DoctorId")
val patientName = call.argument<String>("patientName")
val sessionStatusModel = GetSessionStatusModel(VC_ID, tokenID, generalId, doctorId) val sessionStatusModel = GetSessionStatusModel(VC_ID, tokenID, generalId, doctorId, patientName)
openVideoCall(apiKey, sessionId, token, appLang, baseUrl, sessionStatusModel) openVideoCall(apiKey, sessionId, token, appLang, baseUrl, sessionStatusModel)

@ -20,15 +20,19 @@ public class GetSessionStatusModel implements Parcelable {
@SerializedName("DoctorId") @SerializedName("DoctorId")
@Expose @Expose
private Integer doctorId; private Integer doctorId;
@SerializedName("PatientName")
@Expose
private String patientName;
public GetSessionStatusModel() { public GetSessionStatusModel() {
} }
public GetSessionStatusModel(Integer vCID, String tokenID, String generalid, Integer doctorId) { public GetSessionStatusModel(Integer vCID, String tokenID, String generalid, Integer doctorId, String patientName) {
this.vCID = vCID; this.vCID = vCID;
this.tokenID = tokenID; this.tokenID = tokenID;
this.generalid = generalid; this.generalid = generalid;
this.doctorId = doctorId; this.doctorId = doctorId;
this.patientName = patientName;
} }
protected GetSessionStatusModel(Parcel in) { protected GetSessionStatusModel(Parcel in) {
@ -44,6 +48,7 @@ public class GetSessionStatusModel implements Parcelable {
} else { } else {
doctorId = in.readInt(); doctorId = in.readInt();
} }
patientName = in.readString();
} }
public static final Creator<GetSessionStatusModel> CREATOR = new Creator<GetSessionStatusModel>() { public static final Creator<GetSessionStatusModel> CREATOR = new Creator<GetSessionStatusModel>() {
@ -90,6 +95,16 @@ public class GetSessionStatusModel implements Parcelable {
this.doctorId = doctorId; this.doctorId = doctorId;
} }
public String getPatientName() {
if (patientName == null)
patientName = "-";
return patientName;
}
public void setPatientName(String patientName) {
this.patientName = patientName;
}
@Override @Override
public int describeContents() { public int describeContents() {
return 0; return 0;
@ -111,5 +126,6 @@ public class GetSessionStatusModel implements Parcelable {
dest.writeByte((byte) 1); dest.writeByte((byte) 1);
dest.writeInt(doctorId); dest.writeInt(doctorId);
} }
dest.writeString(patientName);
} }
} }

@ -11,8 +11,10 @@ import android.opengl.GLSurfaceView;
import android.os.Bundle; import android.os.Bundle;
import android.os.CountDownTimer; import android.os.CountDownTimer;
import android.os.Handler; import android.os.Handler;
import android.os.SystemClock;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.Chronometer;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
@ -75,7 +77,13 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
private boolean isSpeckerClicked; private boolean isSpeckerClicked;
private boolean isMicClicked; private boolean isMicClicked;
private TextView patientName;
private Chronometer cmTimer;
long elapsedTime;
Boolean resume = false;
private ImageView mCallBtn; private ImageView mCallBtn;
private ImageView btnMinimize;
private ImageView mCameraBtn; private ImageView mCameraBtn;
private ImageView mSwitchCameraBtn; private ImageView mSwitchCameraBtn;
private ImageView mspeckerBtn; private ImageView mspeckerBtn;
@ -128,7 +136,7 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
@Override @Override
protected void onDestroy() { protected void onDestroy() {
disconnectSession(); disconnectSession();
cmTimer.stop();
super.onDestroy(); super.onDestroy();
} }
@ -148,8 +156,28 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
videoCallPresenter = new VideoCallPresenterImpl(this, baseUrl); videoCallPresenter = new VideoCallPresenterImpl(this, baseUrl);
patientName = findViewById(R.id.patient_name);
patientName.setText(sessionStatusModel.getPatientName());
cmTimer = findViewById(R.id.cmTimer);
cmTimer.setFormat("mm:ss");
cmTimer.setOnChronometerTickListener(arg0 -> {
long minutes;
long seconds;
if (!resume) {
minutes = ((SystemClock.elapsedRealtime() - cmTimer.getBase()) / 1000) / 60;
seconds = ((SystemClock.elapsedRealtime() - cmTimer.getBase()) / 1000) % 60;
elapsedTime = SystemClock.elapsedRealtime();
} else {
minutes = ((elapsedTime - cmTimer.getBase()) / 1000) / 60;
seconds = ((elapsedTime - cmTimer.getBase()) / 1000) % 60;
elapsedTime = elapsedTime + 1000;
}
Log.d(TAG, "onChronometerTick: " + minutes + " : " + seconds);
});
mCallBtn = findViewById(R.id.btn_call); mCallBtn = findViewById(R.id.btn_call);
btnMinimize = findViewById(R.id.btn_minimize);
mCameraBtn = findViewById(R.id.btn_camera); mCameraBtn = findViewById(R.id.btn_camera);
mSwitchCameraBtn = findViewById(R.id.btn_switch_camera); mSwitchCameraBtn = findViewById(R.id.btn_switch_camera);
mspeckerBtn = findViewById(R.id.btn_specker); mspeckerBtn = findViewById(R.id.btn_specker);
@ -252,6 +280,11 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
} }
mSession.publish(mPublisher); mSession.publish(mPublisher);
if (!resume) {
cmTimer.setBase(SystemClock.elapsedRealtime());
}
cmTimer.start();
} }
@Override @Override
@ -259,6 +292,7 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
Log.d(TAG, "onDisconnected: disconnected from session " + session.getSessionId()); Log.d(TAG, "onDisconnected: disconnected from session " + session.getSessionId());
mSession = null; mSession = null;
cmTimer.stop();
} }
@Override @Override
@ -377,6 +411,10 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
finish(); finish();
} }
public void onMinimizedClicked(View view) {
}
public void onSwitchCameraClicked(View view) { public void onSwitchCameraClicked(View view) {
if (mPublisher != null) { if (mPublisher != null) {
isSwitchCameraClicked = !isSwitchCameraClicked; isSwitchCameraClicked = !isSwitchCameraClicked;

@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M8,8l-2,0l0,9l11,0l0,-2l-9,0z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M22,3H10v10h12V3zM20,11h-8V7h8V11z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M4,12l-2,0l0,9l11,0l0,-2l-9,0z"/>
</vector>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp"/>
<solid android:color="@color/green_dark"/>
</shape>

@ -1,169 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_clingo_video_call"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.VideoCallActivity"> android:background="@color/text_color"
android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:padding="@dimen/padding_space_big">
android:keepScreenOn="true"
android:clickable="true"> <TextView
android:id="@+id/patient_name"
<LinearLayout android:layout_width="match_parent"
android:id="@+id/subscriberview" android:layout_height="wrap_content"
android:layout_toStartOf="@+id/video_counter_fl"
android:textColor="@color/white"
android:textSize="@dimen/text_size_big"
android:textStyle="bold"
tools:text="Mousa Abuzaid" />
<FrameLayout
android:id="@+id/video_counter_fl"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true" android:background="@drawable/shape_capsule"
android:orientation="horizontal"/> android:padding="@dimen/padding_space_small">
<Chronometer
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
tools:text="25:45"
android:textColor="@color/white"
android:textStyle="bold"
android:id="@+id/cmTimer" />
</FrameLayout>
<RelativeLayout
android:id="@+id/publisherview"
android:layout_height="200dp"
android:layout_width="150dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/remote_video_view_container" android:id="@+id/activity_clingo_video_call"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="0dp"
android:background="@color/remoteBackground"> android:layout_weight="1"
tools:context=".ui.VideoCallActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:gravity="center_horizontal"
android:keepScreenOn="true">
<LinearLayout
android:id="@+id/subscriberview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:orientation="horizontal" />
<RelativeLayout
android:id="@+id/publisherview"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin" />
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/remote_video_view_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@id/icon_padding"> android:background="@color/remoteBackground">
<ImageView <ImageView
android:layout_width="@dimen/remote_back_icon_size" android:layout_width="@dimen/remote_back_icon_size"
android:layout_height="@dimen/remote_back_icon_size" android:layout_height="@dimen/remote_back_icon_size"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/video_off_fill" /> android:src="@drawable/video_off_fill" />
</RelativeLayout> </RelativeLayout>
<RelativeLayout
android:id="@+id/icon_padding"
android:layout_width="match_parent"
android:layout_height="@dimen/remote_back_icon_margin_bottom"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
<FrameLayout <FrameLayout
android:id="@+id/local_video_view_container" android:id="@+id/local_video_view_container"
android:layout_width="@dimen/local_preview_width" android:layout_width="@dimen/local_preview_width"
android:layout_height="@dimen/local_preview_height" android:layout_height="@dimen/local_preview_height"
android:layout_alignParentEnd="true" android:layout_alignParentTop="true"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_alignParentTop="true" android:layout_marginTop="@dimen/local_preview_margin_top"
android:layout_marginEnd="@dimen/local_preview_margin_right" android:layout_marginEnd="@dimen/local_preview_margin_right"
android:layout_marginRight="@dimen/local_preview_margin_right" android:background="@color/localBackground">
android:layout_marginTop="@dimen/local_preview_margin_top"
android:background="@color/localBackground">
<ImageView <ImageView
android:layout_width="@dimen/local_back_icon_size" android:layout_width="@dimen/local_back_icon_size"
android:layout_height="@dimen/local_back_icon_size" android:layout_height="@dimen/local_back_icon_size"
android:layout_gravity="center" android:layout_gravity="center"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/video_off_fill" /> android:src="@drawable/video_off_fill" />
</FrameLayout> </FrameLayout>
<ImageView
android:id="@+id/btn_switch_camera"
android:layout_width="@dimen/video_icon_size"
android:layout_height="@dimen/video_icon_size"
android:layout_centerVertical="true"
android:layout_below="@+id/local_video_view_container"
android:layout_marginTop="@dimen/local_preview_margin_top"
android:layout_marginEnd="@dimen/local_preview_margin_right"
android:layout_alignParentEnd="true"
android:onClick="onSwitchCameraClicked"
android:scaleType="centerCrop"
android:src="@drawable/flip_enabled" />
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/control_panel" android:id="@+id/control_panel"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:padding="@dimen/padding_space_big_2">
android:layout_marginBottom="60dp">
<ImageView <ImageView
android:id="@+id/btn_call" android:id="@+id/btn_call"
android:layout_width="71dp" android:layout_width="@dimen/video_icon_size"
android:layout_height="71dp" android:layout_height="@dimen/video_icon_size"
android:layout_centerInParent="true" android:layout_alignParentEnd="true"
android:onClick="onCallClicked" android:onClick="onCallClicked"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/call" /> android:src="@drawable/call" />
<ImageView <ImageView
android:id="@+id/btn_switch_camera" android:id="@+id/btn_minimize"
android:layout_width="39dp" android:layout_width="@dimen/video_icon_size"
android:layout_height="39dp" android:layout_height="@dimen/video_icon_size"
android:layout_centerVertical="true" android:layout_alignParentStart="true"
android:layout_marginLeft="@dimen/control_bottom_horizontal_margin" android:onClick="onMinimizedClicked"
android:layout_toEndOf="@id/btn_camera" android:layout_marginEnd="@dimen/padding_space_small"
android:layout_toRightOf="@id/btn_camera"
android:onClick="onSwitchCameraClicked"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/flip_enabled" /> android:src="@drawable/ic_mini" />
<ImageView <ImageView
android:id="@+id/btn_camera" android:id="@+id/btn_camera"
android:layout_width="39dp" android:layout_width="@dimen/video_icon_size"
android:layout_height="39dp" android:layout_height="@dimen/video_icon_size"
android:layout_centerVertical="true" android:layout_toEndOf="@id/btn_minimize"
android:layout_marginLeft="@dimen/control_bottom_horizontal_margin"
android:layout_toEndOf="@id/btn_call"
android:layout_toRightOf="@id/btn_call"
android:onClick="onCameraClicked" android:onClick="onCameraClicked"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_marginEnd="@dimen/padding_space_small"
android:src="@drawable/video_enabled" /> android:src="@drawable/video_enabled" />
<ImageView <ImageView
android:id="@+id/btn_mic" android:id="@+id/btn_mic"
android:layout_width="39dp" android:layout_width="@dimen/video_icon_size"
android:layout_height="39dp" android:layout_height="@dimen/video_icon_size"
android:layout_centerVertical="true" android:layout_toEndOf="@id/btn_camera"
android:layout_marginRight="@dimen/control_bottom_horizontal_margin"
android:layout_toStartOf="@id/btn_call"
android:layout_toLeftOf="@id/btn_call"
android:onClick="onMicClicked" android:onClick="onMicClicked"
android:layout_marginEnd="@dimen/padding_space_small"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/mic_enabled" /> android:src="@drawable/mic_enabled" />
<ImageView <ImageView
android:id="@+id/btn_specker" android:id="@+id/btn_specker"
android:layout_width="39dp" android:layout_width="@dimen/video_icon_size"
android:layout_height="39dp" android:layout_height="@dimen/video_icon_size"
android:layout_centerVertical="true" android:layout_toEndOf="@id/btn_mic"
android:layout_marginRight="@dimen/control_bottom_horizontal_margin"
android:layout_toStartOf="@id/btn_mic"
android:layout_toLeftOf="@id/btn_mic"
android:onClick="onSpeckerClicked" android:onClick="onSpeckerClicked"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:layout_marginEnd="@dimen/padding_space_small"
android:src="@drawable/audio_enabled" /> android:src="@drawable/audio_enabled" />
</RelativeLayout> </RelativeLayout>
</LinearLayout>
<!-- <RelativeLayout-->
<!-- android:id="@+id/progressBar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="40dp"-->
<!-- android:layout_alignParentBottom="true">-->
<!-- <ProgressBar-->
<!-- android:id="@+id/progress_bar"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="31dp"-->
<!-- android:layout_alignParentEnd="true"-->
<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_marginEnd="0dp"-->
<!-- android:layout_marginBottom="0dp"-->
<!-- android:progressBackgroundTint="@color/colorProgressBarBackground"-->
<!-- style="@android:style/Widget.ProgressBar.Horizontal" />-->
<!-- <TextView-->
<!-- android:id="@+id/progress_bar_text"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="9dp"-->
<!-- android:gravity="center_vertical"-->
<!-- android:textColor="@color/colorPrimary"-->
<!-- android:layout_centerInParent="true"/>-->
<!-- </RelativeLayout>-->
</RelativeLayout>

@ -8,4 +8,10 @@
<!-- Chat Activity --> <!-- Chat Activity -->
<color name="localBackground">#827b92</color> <color name="localBackground">#827b92</color>
<color name="remoteBackground">#484258</color> <color name="remoteBackground">#484258</color>
<color name="text_color">#FF2E303A</color>
<color name="white">#fff</color>
<color name="black">#000</color>
<color name="green_dark">#389842</color>
<color name="red_dark">#d51e26</color>
</resources> </resources>

@ -8,7 +8,11 @@
<!-- buttons --> <!-- buttons -->
<dimen name="call_button_size">60dp</dimen> <dimen name="call_button_size">60dp</dimen>
<dimen name="other_button_size">54dp</dimen> <dimen name="other_button_size">54dp</dimen>
<dimen name="video_icon_size">64dp</dimen>
<!-- buttons -->
<dimen name="control_bottom_margin">24dp</dimen>
<dimen name="control_bottom_horizontal_margin">25dp</dimen>
<dimen name="local_preview_width">88dp</dimen> <dimen name="local_preview_width">88dp</dimen>
<dimen name="local_preview_height">117dp</dimen> <dimen name="local_preview_height">117dp</dimen>
@ -16,7 +20,16 @@
<dimen name="remote_back_icon_size">100dp</dimen> <dimen name="remote_back_icon_size">100dp</dimen>
<dimen name="remote_back_icon_margin_bottom">90dp</dimen> <dimen name="remote_back_icon_margin_bottom">90dp</dimen>
<!-- buttons --> <!-- text-->
<dimen name="control_bottom_margin">24dp</dimen> <dimen name="text_size_small">14sp</dimen>
<dimen name="control_bottom_horizontal_margin">25dp</dimen> <dimen name="text_size_medium">16sp</dimen>
<dimen name="text_size_big">24sp</dimen>
<!-- padding/margin-->
<dimen name="padding_space_small">4dp</dimen>
<dimen name="padding_space_medium">8sp</dimen>
<dimen name="padding_space_big">16dp</dimen>
<dimen name="padding_space_big_2">24dp</dimen>
</resources> </resources>

@ -65,6 +65,7 @@ class _EndCallScreenState extends State<EndCallScreen> {
kSessionId: liveCareModel.startCallRes.openSessionID, kSessionId: liveCareModel.startCallRes.openSessionID,
kApiKey: '46209962', kApiKey: '46209962',
vcId: widget.patient.vcId, vcId: widget.patient.vcId,
patientName: widget.patient.fullName ?? widget.patient.firstName != null ? "${widget.patient.firstName} ${widget.patient.lastName}" : "-",
tokenID: await liveCareModel.getToken(), tokenID: await liveCareModel.getToken(),
generalId: GENERAL_ID, generalId: GENERAL_ID,
doctorId: liveCareModel.doctorProfile.doctorID, doctorId: liveCareModel.doctorProfile.doctorID,

@ -66,6 +66,7 @@ class _VideoCallPageState extends State<VideoCallPage> {
//'1_MX40NjgwMzIyNH5-MTU5MzY4MzYzODYwM35ucExWYVRVSm5Hcy9uWGZmM1lOa3czZHV-fg', //'1_MX40NjgwMzIyNH5-MTU5MzY4MzYzODYwM35ucExWYVRVSm5Hcy9uWGZmM1lOa3czZHV-fg',
kApiKey: '46209962', kApiKey: '46209962',
vcId: widget.patientData.vcId, vcId: widget.patientData.vcId,
patientName: widget.patientData.fullName ?? widget.patientData.firstName != null ? "${widget.patientData.firstName} ${widget.patientData.lastName}" : "-",
tokenID: token, //"hfkjshdf347r8743", tokenID: token, //"hfkjshdf347r8743",
generalId: "Cs2020@2016\$2958", generalId: "Cs2020@2016\$2958",
doctorId: doctorprofile['DoctorID'], doctorId: doctorprofile['DoctorID'],

@ -327,6 +327,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
kSessionId: model.startCallRes.openSessionID, kSessionId: model.startCallRes.openSessionID,
kApiKey: '46209962', kApiKey: '46209962',
vcId: patient.vcId, vcId: patient.vcId,
patientName: patient.fullName ?? patient.firstName != null ? "${patient.firstName} ${patient.lastName}" : "-",
tokenID: await model.getToken(), tokenID: await model.getToken(),
generalId: GENERAL_ID, generalId: GENERAL_ID,
doctorId: model.doctorProfile.doctorID, doctorId: model.doctorProfile.doctorID,

@ -10,7 +10,7 @@ class VideoChannel{
/// channel name /// channel name
static const _channel = const MethodChannel("Dr.cloudSolution/videoCall"); static const _channel = const MethodChannel("Dr.cloudSolution/videoCall");
static openVideoCallScreen( static openVideoCallScreen(
{kApiKey, kSessionId, kToken, callDuration, warningDuration,int vcId,String tokenID,String generalId,int doctorId, Function() onCallEnd , Function(SessionStatusModel sessionStatusModel) onCallNotRespond ,Function(String error) onFailure}) async { {kApiKey, kSessionId, kToken, callDuration, warningDuration,int vcId,String tokenID,String generalId,int doctorId, String patientName, Function() onCallEnd , Function(SessionStatusModel sessionStatusModel) onCallNotRespond ,Function(String error) onFailure}) async {
var result; var result;
try { try {
result = await _channel.invokeMethod( result = await _channel.invokeMethod(
@ -25,6 +25,7 @@ class VideoChannel{
"TokenID": tokenID, "TokenID": tokenID,
"generalId": generalId, "generalId": generalId,
"DoctorId": doctorId , "DoctorId": doctorId ,
"patientName": patientName,
}, },
); );
if(result['callResponse'] == 'CallEnd') { if(result['callResponse'] == 'CallEnd') {

Loading…
Cancel
Save