Giter VIP home page Giter VIP logo

opentok-xamarin.forms's Introduction

opentok-xamarin.forms's People

Contributors

andreimisiukevich avatar dependabot[bot] avatar jtone123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

opentok-xamarin.forms's Issues

Remove_popup

Hi,
When we start chat, there is a popup which populated by default over the screen. user have to close it then we can see other user video. can we remove/close it automatically? or there is any mechanism to not show the popup by default?
Please suggest me if it is possible. Thanks

Add event for new stream subscriptions

I have an app where I have two views. I want to populate them based on the first and second id in the collection. I need to manually bind these IDs but I do not know when the CrossOpenTok.Current.StreamIdCollection object will be populated. I am force to do a while loop and check the collection. Having an event to let us know that a the collection changed would be very helpful.

Remove binding to StreamIdCollection() from one Page and bind it again on another Page automatically on Android

I have first screen in which I have one publisher and subscriber view which works great. I navigate to next screen by PushModelAsync and I have a ListView in next screen. I have a subcriberView in the ItemTemplate of the listview which is binded to StreamIdCollection.

When I launch app, i see first screen and i can see publisher and subscriber. I go to see participants on the next screen. It works. I come back and go again to see the participants but app crashes with following exception:

{System.MissingMethodException: No constructor found for http://Xamarin.Forms.OpenTok.Android.OpenTokSubscriberViewRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationE…}

I tried to add such a constructor but ViewRenderer does not have a constructor which takes these two arguments. It only takes one argument (Context).

iOS is working fine. Problem is only with Android. In iOS, upon navigating back to first screen, SubscriberView automatically binds to StreamIdCollection property but does not.

About Permissions

Hello Andrei, thank you for this great plugin!
I have a slight problem with the permissions.
My use case is audio only, so that I don't need camera permissions. Is there any way to prevent the app from asking the user to enable camera permissions?

Also, on Android, is there an option to not ask for local storage permissions?
I need to ask only for microphone permissions.

Thank you.

Integrate OpenTok + ReplayKit

Hi Andrei,

There is a feature very important and I think will be helpful for many people the integration of SDK with ReplayKit from Apple to share the screen.

The user will be able to share the screen of the App and navigate between other screen.

Is there one way to share the screen using the OpenTok?

Many Thanks.

Screen sharing - not being picked up

Hi Andrei,
I am coding a combined website and mobile app solution. its online-tutoring solution,

When I change from video share to screen share on the site the xamarin nuget solution does not pick up the change and re-subscribe.
if I change back to video share - it does re-subscribe.
Can you include this?

Or is there a way I can react to an event where I see its now screen-share video and then re-initialise?

Weirdly, if I end the session and init it again then it subscribes to the screen share video.

in java script I do this

session.on('streamCreated', function(event)
{
console.log("New stream in the session: " + event.stream.streamId);
console.log("New stream in the session: " + event.stream.videoType);

            if (event.stream.videoType == 'camera')
            {
                var elem = document.getElementById("subscriber");
                elem.style.display = "block";
                var elem = document.getElementById("whiteboard");
                elem.style.display = "none";
                subscriber = Null = session.subscribe(event.stream, 'subscriber',
                {
                    insertMode: 'append',
                    width: '100%',
                    height: '100%',
                }, handleError);
            }
            else
            if (event.stream.videoType == 'screen')
            {
                var elem = document.getElementById("subscriber");
                elem.style.display = "none";
                var elem = document.getElementById("whiteboard");
                elem.style.display = "block";
                subscriber = Null = session.subscribe(event.stream, 'whiteboard',
                {
                    insertMode: 'append',
                    width: '100%',
                    height: '100%',
                }, handleError);
            };
        }
    );

got an error when build project

java.lang.IllegalArgumentException: already added : Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;

please help...

Android Issue

Hi, i have a problem whit Xamarin Android Implementation.

sdkproblem

is there a solution to this?

App store publish error

After development, I submitted the App to AppStore, I received the following mail. In our code, we don't use any WebView APIs. Is this the problem with your library.

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of new apps that use UIWebView APIs starting from April 2020.

If yes, can you kindly let us know the alternate?

Thanks,
MTK.

Is there any way to get Audio Levels Information in Xamarin Forms ?

If you refer to this documentation page on TokBox site:
https://tokbox.com/developer/guides/customize-ui/android/index.html#audio_levels

They have a method for android to get Audio Levels information for each subscriber and publisher. Can we have this in Xamarin Forms SDK or a way to add this using Renderer/ Dependancy service ?
Below is the sample method from native Android documentation:

@Override public void onAudioLevelUpdated( SubscriberKit subscriber, float audioLevel) { // Adjust an audio meter UI element based on the audioLevel value. }

Opentok Pre-Call test

Hi Andrei, is there any possibility to include a pre-call test to check the connection upfront?!
I saw samples in javascript and native ios and android but nothing in xamarin so far.

Regards - Wolfgang

Is it possible to use with UWP?

Hello, excellent project. I am making an app in Xamarin for health, and I would like to integrate video calls, is it possible to do this with UWP?

Best regards.

Mute and unmute video as well as audio

Hi,
I'm trying to implement a video chat application, i have to add the feature to mute and unmute audio as well video. How can I do it with it. Thanks in advance.

Error in Camera

Hello Andrei,

I'm using your nutget, at some point I made a call and ended it, then I tried to make another call a few minutes later and I saw that there were problems with the visualization of one of the cameras.

The question is, is there something that can be done on your project side or mine to prevent the following error:

com.opentok.android.Camera2VideoCapturer.initCamera
com.opentok.android.Camera2VideoCapturer$Camera2Exception: CAMERA_IN_USE (4): connectHelper:1607: Higher-priority client using camera, ID "1" currently unavailable

Open
Stack traces

com.opentok.android.Camera2VideoCapturer.initCamera
com.opentok.android.Camera2VideoCapturer.a
com.opentok.android.Camera2VideoCapturer.lambda$EOJ6zJ_KyEal1aLQznxfTJOPcJc
com.opentok.android.-$$Lambda$Camera2VideoCapturer$EOJ6zJ_KyEal1aLQznxfTJOPcJc.run
com.opentok.android.Camera2VideoCapturer$4.onClosed
android.hardware.camera2.impl.CameraDeviceImpl$5.run CameraDeviceImpl.java:215
android.os.Handler.handleCallback Handler.java:883
android.os.Handler.dispatchMessage Handler.java:100
android.os.Looper.loop Looper.java:224
android.app.ActivityThread.main ActivityThread.java:7565
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:539
com.android.internal.os.ZygoteInit.main ZygoteInit.java:950

Best regards.

KeyURL not found in config.cs file in the sample.

I have integrated the provided github solution, but there is not "Key URL" provided.
Please suggest from where I can get the key url for my project used in the below snippet:

using (var client = new HttpClient())
           {
               try
               {
                   var resp = await client.GetAsync(Config.KeysUrl);
                   var json = await resp.Content.ReadAsStringAsync();
                   var keys = JsonConvert.DeserializeObject<Keys>(json);

                   CrossOpenTok.Current.ApiKey = keys.ApiKey;
                   CrossOpenTok.Current.SessionId = keys.SessionId;
                   CrossOpenTok.Current.UserToken = keys.Token;
               }
               catch
               {
                   await DisplayAlert(null, "MAKE SURE YOU SET API URL FOR RETRIEVING NECESSARY KEYS (Config.cs) OR YOU MAY HARDCODE THEM.", "GOT IT");
               }

Attempt to read from field 'android.os.MessageQueue android.os.Looper.mQueue' on a null object reference

Hello,

I have been using your nutget and I like it. but with great frequency, I get this exception in android: android.os.MessageQueue android.os.Looper.mQueue.

Here I leave a trace a little longer before reaching the error:

Java.Interop
JniEnvironment + InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue * args)
Java.Interop
JniPeerMembers + JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue * parameters)
Com.Opentok.Android
Session + Builder.Build ()
Xamarin.Forms.OpenTok.Android.Service
PlatformOpenTokService.TryStartSession () /Users/andrei/Desktop/tokBox/Lib/Xamarin.Forms.OpenTok.Android/Service/PlatformOpenTokService.cs:68

Best regards,

OpenTokSubscriberView not working

Hi,

this is query
I implemented this plugin in my xamarin forms project, created account obtained key, session and token but OpenTokSubscriberView not showing anything. is there any specific configuration needed or else? or how subscriberview works

[Xamarin.iOS] Exception with CrossOpenTok.Current.EndSession()

Following the sample app, when I attempt to end the call and click the "End Call" button, I get the following exception:

Looking at the stack trace, I found the error to be caused by these lines:
Line 93 @ PlatformOpenTokService.cs _subscriberStreamIds.Clear();
Line 98 @ BaseOpenTokService.cs protected void OnSubscriberStreamIdsCollectionChanged(object sender, NotifyCollectionChangedEventArgs => StreamIdCollectionChanged(sender, e);

Here is the full stack trace

System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Forms.OpenTok.Service.BaseOpenTokService.OnSubscriberStreamIdsCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in /Users/andrei/Desktop/tokBox/Lib/Xamarin.Forms.OpenTok/Service/BaseOpenTokService.cs:98
  at at (wrapper delegate-invoke) <Module>.invoke_void_object_NotifyCollectionChangedEventArgs(object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00018] in <079b3c6f37014c7f868f66c7f0ec79f9>:0
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionReset () [0x00000] in <079b3c6f37014c7f868f66c7f0ec79f9>:0
  at System.Collections.ObjectModel.ObservableCollection`1[T].ClearItems () [0x00018] in <079b3c6f37014c7f868f66c7f0ec79f9>:0
  at System.Collections.ObjectModel.Collection`1[T].Clear () [0x00014] in <b2309b0f34c14f2999df87941bbffcf9>:0
  at Xamarin.Forms.OpenTok.iOS.Service.PlatformOpenTokService.EndSession () [0x00059] in /Users/andrei/Desktop/tokBox/Lib/Xamarin.Forms.OpenTok.iOS/Service/PlatformOpenTokService.cs:93
  at InterQR.Views.MyPage.OnEndCall (System.Object sender, System.EventArgs e) [0x0006b] in /InterQR-App/InterQR/Views/MyPage.xaml.cs:19
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1021
  at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.20.2.2/src/Xamarin.iOS/Foundation/NSAction.cs:178
  at at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.20.2.2/src/Xamarin.iOS/UIKit/UIApplication.cs:86
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.20.2.2/src/Xamarin.iOS/UIKit/UIApplication.cs:65
  at InterQR.iOS.Application.Main (System.String[] args) [0x00001] in /InterQR-App/InterQR.iOS/Main.cs:18

White screen on iphone

It is not showing the video of what is being filmed on the iphone screen (iphone 6s iOS 13.4). Android is correct, I was the one who requested the focus recently. Now I went to test on the iphone and I couldn't, follow my xaml.

Note: In the app that receives the video it is possible to see the transmission, both in the front and back cameras, but on the screen itself is all white.
IMG_20200420_165444373
xaml.txt

video layer not showing in iphone

Hi @AndreiMisiukevich for android its working fine, but for iPhone i did not get video layer for publisher and subscriber view. but on other hand(server side) my video is showing. microphone is working fine with both end. i have added PlatformOpenTokService.Init(); in aapdelegate.cs file. is there anything else which i need to add or configure. Please help.

Xamarin.Vonage.Android is not compiling for Andriod-10 and above

Im using Xamarin.Opentok.Android -2.18.1, im able to create video call from my android app. When i tried to upgrade the app target version to 10, video call is not working.
We have developed a telemedicine app using Xamarin-4.8. The app is live in certain regions. we have built for both android and ios. we updated the app recently and uploaded on play store. a lot of customers who are on android 10 and 11 started complaining that the app is not working and compatible with their versions.
we did a thorough investigation to check why the app is not working for android 10.
Our findings are mentioned below :

  1. We were using the old namespace Xamarin.Opentok.Android. we replaced this with Xamarin.Vonage.Android as the forums said that Xamarin.Opentok.Android is deprecated.
    2.Its working up to android-9 version, when we change the version to android-10 we are facing "System.MissingFieldException: 'Field not found: int .Animation.btn_checkbox_to_checked_box_inner_merged_animation Due to: Could not find field in class' ".
    3.When we remove the dependencies of Opentok we are able to compile the application for Android-10.
    4.Our understanding is that the "PlatformOpenTokService.Init();" class in not getting initialized and hence it is allowing us to compile on Android-10.
    5.We were able to compile up to [Android-9.](url
    WhatsApp Image 2021-04-06 at 14 59 27
    )

publishing to multiple sessions

Hi,
I need to publish my front camera to multiple 1:1 sessions. What should I do to achieve that? I tried to modify OpenTokPlatformService class to create multiple instances, but unfortunately when my device was publishing to the second session the stream in the first one stopped.
I hope to hear back from you soon.
Dung

Multiparty video chat

I'm currently trying to use this library to start a multiparty video chat, but it's not quite working as expected. When the third user joins the session, he acts as a view only subscriber as opposed to a publisher. This means the first two users don't see or hear his stream, and he only sees the first users stream. Is there a method I'm missing to enable multiparty?

Video Decoder Error

Hello, I've followed all steps and looked at the sample code but any time I try running on a physical device I get this same error.
Severity Code Description Project File Line Suppression State Error java/lang/String;)Lorg/webrtc/VideoDecoder;: defining a default interface method requires --min-sdk-version >= 24 (currently 13) for interface methods: org.webrtc.VideoDecoderFactory.createDecoder : (Ljava/lang/String;)Lorg/webrtc/VideoDecoder; VoiceChatTest.Android

Im very sure that my SDK is greater than 24, is there a solution to this?

Blurred video from back camera

Congratulations on the project.

I would like to know if it is possible to improve the focus on the video. I need to show a TV tag, but the camera is blurry.

For testing I'm using a Moto G7 Power 64GB 4GB OctaCore 1.8GHz 6.2 "12MP.

Session Ended Event

Hello Andrei,

Is there the possibility of implementing an event that allows us to be notified when a session from the other end has ended session? something similar to this Session.StreamDropped event?

Best regards,

Event when subscriber end session

Hi Andrei! nice work porting Opentok library to Xamarin.Forms. I've been using a mix of native library to Xamarin.Android/Xamarin.iOS in Xamarin.Forms project. I've been testing this plugin but I miss the event when the other person ends the videocall, OnSessionEnded(). I'm trying to catch it in CrossOpenTok.Current.PropertyChanged += (sender, e) => {...} the combination when that happens, but it's not clear when the call is ended, because IsPublishingStarted and IsSessionStarted begins with value = false, and event updated more than twice before video call is ended. All of this is for manage the Navigation.PopAsync().

Could you have an idea of how to handle it?

Regards!

Take a snapshot in Android

Hi,

is there a way to make a snapshot of the current Publisher stream?
I tried it in PlatformOpenTokService with the following:

  if (PublisherKit == null)
                return null;

            var rootView = PublisherKit.View;

            using (var screenshot = Bitmap.CreateBitmap(
                                    rootView.Width,
                                    rootView.Height,
                                    Bitmap.Config.Argb8888))
            {
                var canvas = new Canvas(screenshot);
                rootView.Draw(canvas);

                using (var stream = new MemoryStream())
                {
                    screenshot.Compress(Bitmap.CompressFormat.Jpeg, 100, stream);
                    return stream.ToArray();
                }
            }

But I only get a black image in return. Do you habe any suggestions?

BR
Wolfgang

BTW. Signaling is working perfectly!

Nothing happens when selecting "Click to Chat"

I downloaded this repo and hardcoded keys in App.cs. When I run the project on iOS and Android, nothing is happening when I click the click to chat button. On Android, it does ask for permissions, but I cannot get the ChatRoomPage to push.

_subscriberView in xaml page

Hello Andrei,

Great work! It works perfect. Only one question, how can I include _subscriberView or _publisherView in xaml page?

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.