capacitor-plugin-vonage 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -152,6 +152,7 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
152
152
|
@Override
|
153
153
|
public void onConnected(Session session) {
|
154
154
|
main.setVisibility(View.VISIBLE);
|
155
|
+
startTimer();
|
155
156
|
progressBar.setVisibility(View.INVISIBLE);
|
156
157
|
publisher = new Publisher.Builder(VideoCallActivity.this).build();
|
157
158
|
publisher.setPublisherListener(publisherListener);
|
@@ -422,7 +423,7 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
422
423
|
timerTextView = findViewById(R.id.timerTextView);
|
423
424
|
startTime = System.currentTimeMillis();
|
424
425
|
isTimeron =true;
|
425
|
-
startTimer();
|
426
|
+
// startTimer();
|
426
427
|
ProviderViewLayout = findViewById(R.id.providerViewLayout);
|
427
428
|
if(ISPROVIDER){
|
428
429
|
ProviderViewLayout.setVisibility(View.VISIBLE);
|
@@ -509,13 +510,13 @@ public class VideoCallActivity extends AppCompatActivity implements EasyPermissi
|
|
509
510
|
if (!isCamOff) {
|
510
511
|
publisher.setPublishVideo(false);
|
511
512
|
imageViewCamOff.setImageResource(R.drawable.cameraoff);
|
512
|
-
imageViewCamSwitch.setVisibility(View.GONE);
|
513
|
+
// imageViewCamSwitch.setVisibility(View.GONE);
|
513
514
|
|
514
515
|
|
515
516
|
} else {
|
516
517
|
publisher.setPublishVideo(true);
|
517
518
|
imageViewCamOff.setImageResource(R.drawable.cameraonwhite);
|
518
|
-
imageViewCamSwitch.setVisibility(View.VISIBLE);
|
519
|
+
// imageViewCamSwitch.setVisibility(View.VISIBLE);
|
519
520
|
|
520
521
|
}
|
521
522
|
isCamOff = !isCamOff;
|
@@ -4,15 +4,16 @@
|
|
4
4
|
android:layout_width="wrap_content"
|
5
5
|
android:layout_height="wrap_content"
|
6
6
|
android:orientation="vertical"
|
7
|
-
android:padding="
|
8
|
-
android:background="#
|
7
|
+
android:padding="7dp"
|
8
|
+
android:background="#0B6623">
|
9
9
|
|
10
10
|
<TextView
|
11
11
|
android:id="@+id/toastView"
|
12
12
|
android:layout_width="wrap_content"
|
13
13
|
android:layout_height="wrap_content"
|
14
14
|
android:text="Custom Toast"
|
15
|
-
android:
|
15
|
+
android:textSize="11sp"
|
16
|
+
android:textColor="#FFFFFF"
|
16
17
|
android:textStyle="bold"
|
17
18
|
android:layout_gravity="center_horizontal"/>
|
18
19
|
</LinearLayout>
|
@@ -327,21 +327,23 @@ class VideoChatViewController: UIViewController,OTSessionDelegate,OTPublisherDel
|
|
327
327
|
|
328
328
|
self.view.addSubview(bottomView)
|
329
329
|
|
330
|
-
localView = UIView(frame: CGRect(x: screenWidth - 140, y: screenHeight -
|
330
|
+
localView = UIView(frame: CGRect(x: screenWidth - 140, y: screenHeight - 260, width: 120, height: 120))
|
331
331
|
localView.backgroundColor = UIColor(red: 31/255, green: 33/255, blue: 36/255, alpha: 1.0)
|
332
|
-
|
332
|
+
localView.layer.borderColor = UIColor(hex: "#9b9c98").cgColor
|
333
|
+
localView.layer.borderWidth = 1.0
|
333
334
|
localView.layer.cornerRadius = 10;
|
334
335
|
localView.clipsToBounds = true
|
335
336
|
localView.isHidden = true
|
336
337
|
|
337
|
-
publisherLabel = UILabel(frame: CGRect(x:
|
338
|
-
publisherLabel.text = publisherName
|
338
|
+
publisherLabel = UILabel(frame: CGRect(x: Int(screenWidth - 160), y: Int(screenHeight - 140), width: 160, height: 40))
|
339
|
+
//publisherLabel.text = publisherName
|
339
340
|
// publisherLabel.backgroundColor = UIColor(red: 31/255, green: 33/255, blue: 36/255, alpha: 1.0)
|
340
|
-
publisherLabel.textColor = .
|
341
|
+
publisherLabel.textColor = .black//UIColor(hex: "#000000")
|
341
342
|
publisherLabel.textAlignment = .center
|
342
343
|
publisherLabel.layer.zPosition = 1;
|
343
344
|
publisherLabel.font = publisherLabel.font.withSize(dynamicFontSize(UIDevice.current.userInterfaceIdiom == .pad ? 10 : 15))
|
344
|
-
|
345
|
+
remoteView.addSubview(publisherLabel)
|
346
|
+
//localView.addSubview(publisherLabel)
|
345
347
|
self.view.addSubview(localView)
|
346
348
|
|
347
349
|
callBtn = UIButton(frame: CGRect(x: 240, y: 0, width: 60, height: 60))
|
@@ -538,7 +540,7 @@ class VideoChatViewController: UIViewController,OTSessionDelegate,OTPublisherDel
|
|
538
540
|
// let screenBounds = UIScreen.main.bounds
|
539
541
|
//changed
|
540
542
|
publisherView.frame = CGRect(x: 0, y: 0 , width: localView.frame.width, height: localView.frame.height)
|
541
|
-
|
543
|
+
publisherLabel.text = publisherName
|
542
544
|
localView.addSubview(publisherView)
|
543
545
|
startTimer()
|
544
546
|
DispatchQueue.main.async {
|
@@ -584,6 +586,8 @@ class VideoChatViewController: UIViewController,OTSessionDelegate,OTPublisherDel
|
|
584
586
|
if(stream.videoType == .screen){
|
585
587
|
subscriberView.accessibilityValue = "from screen"
|
586
588
|
}
|
589
|
+
timerLabel.textColor = .white
|
590
|
+
publisherLabel.textColor = .white
|
587
591
|
remoteView.addSubview(subscriberView)
|
588
592
|
}
|
589
593
|
|
@@ -642,6 +646,7 @@ class VideoChatViewController: UIViewController,OTSessionDelegate,OTPublisherDel
|
|
642
646
|
subscriberStatusLabel.isHidden = true
|
643
647
|
subscriberNameLabel.isHidden = true
|
644
648
|
timerLabel.textColor = .white
|
649
|
+
publisherLabel.textColor = .white
|
645
650
|
isCallInProgress = true
|
646
651
|
adminBtn.isHidden = true
|
647
652
|
denyBtn.isHidden = true
|
@@ -673,6 +678,7 @@ class VideoChatViewController: UIViewController,OTSessionDelegate,OTPublisherDel
|
|
673
678
|
subscriberStatusLabel.isHidden = true
|
674
679
|
subscriberNameLabel.isHidden = true
|
675
680
|
timerLabel.textColor = .white
|
681
|
+
publisherLabel.textColor = .white
|
676
682
|
// showToast(message: "is provider \(isProvider) video enabled")
|
677
683
|
|
678
684
|
// Remove the video disabled indicator
|
@@ -710,6 +716,8 @@ class VideoChatViewController: UIViewController,OTSessionDelegate,OTPublisherDel
|
|
710
716
|
//}
|
711
717
|
}
|
712
718
|
fileprivate func cleanupSubscriber() {
|
719
|
+
timerLabel.textColor = .black
|
720
|
+
publisherLabel.textColor = .black
|
713
721
|
subscriber?.view?.removeFromSuperview()
|
714
722
|
subscriber = nil
|
715
723
|
remoteView.backgroundColor = .white
|