opentok / cordova-plugin-opentok Goto Github PK
View Code? Open in Web Editor NEWThis project forked from msach22/cordova-plugin-opentok
Cordova Plugin for OpenTok - add webrtc video to your iOS or Android App
License: MIT License
This project forked from msach22/cordova-plugin-opentok
Cordova Plugin for OpenTok - add webrtc video to your iOS or Android App
License: MIT License
Current behavior
Signal events are being dispatched twice for the same type.
Steps to reproduce
In order to receive signal events I needed to register an event handler with the type of signal event. For example, consider signal events with type set to 'chat':
this.session.on({
streamCreated: (event) => {
this.session.subscribe(event.stream, 'your-video');
},
streamDestroyed: (event) => {
},
'chat': function(evt) {
var chat = document.getElementById('chat');
var p = document.createElement("p");
p.innerHTML = evt.data;
chat.appendChild(p);
}
});
This differs from the signal sample project where an event is listened to with the notation: 'signal:chat'.
When the signal is received this code is executed:
TBSession.prototype.signalReceived = function(event) {
var streamEvent;
streamEvent = new TBEvent("signal");
streamEvent.type = event.type; // <<<<<
streamEvent.data = event.data;
streamEvent.from = this.connections[event.connectionId];
this.dispatchEvent(streamEvent);
streamEvent = new TBEvent("signal:" + event.type);
streamEvent.type = event.type; // <<<<<
streamEvent.data = event.data;
streamEvent.from = this.connections[event.connectionId];
return this.dispatchEvent(streamEvent);
};
Note that it constructs two TBEvent objects, one with the type 'signal' and one with 'signal:' +event.type.
However, both events have their type explicitly set to event.type, overwriting this distinction.
The result is that two events for the same type are triggered, rather than two different events.
Removing the explicit setting of streamEvent.type (the lines noted above) fixes this issue.
Example Project
None provided. If this is necessary, I'll create one.
What is the current bug behavior?
See above.
What is the expected correct behavior?
See above.
Howdy -
I've added the cordova-plugin-opentok to my project, and when I build and deploy the app to my Android device it works well.
When I run: 'ionic serve' and use the local browser instance, I get an error that OT is undefined. If I manually copy opentok.js into the top level 'www', I get an error about Cordova not being defined. From poking around on the web, I see that this isn't surprising: cordova plugins don't appear to function in a 'ionic serve' context.
What's really vexing is that I'm running into a similar issue using the Ionic View App. I can push a build to the ionic pro dashboard, and can access the newly built app in Ionic View on my Android phone.
However, when I browse to a page that uses the top level variable OT, I get an error that it's not defined.
Is this plugin simply not going to work in both a 'ionic serve' and within the Ionic View app context? Or, did I mess up my setup somewhere along the way?
What info I can I provide to make debugging this possible?
My Environment:
$ ionic info
cli packages: (C:\Users\ben\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 25.2.5
Node : v6.11.4
npm : 5.6.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : c:/tools/android
Misc:
backend : pro
$ ionic cordova plugins
> cordova plugin ls
com.tokbox.cordova.opentok 3.1.2 "OpenTokCordovaPlugin"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-screen-orientation 3.0.1 "Screen Orientation"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
es6-promise-plugin 4.2.2 "Promise"
Browser is also a platform that could be used on Cordova. Wouldn't it be a good idea to add the opentokjs when platform is browser?
Please post usage questions or broader discussions on StackOverflow.
For feature requests, please fill out the feature request template
For bug reports, please fill out the bug report issue template
When creating a new Publisher
in the RunnablePublisher::run()
on android, it calls setPublishAudio(publishVideo)
instead of setPublishVideo(publishVideo)
. Will send in a PR to set it right.
Not sure if this belongs here or opentok-ionic-samples
Check it out:
https://github.com/opentok/opentok-ionic-samples/issues/8
Thanks for your help!
Current behavior
(Summarize the bug encountered concisely)
The android codes work perfectly. however, I have tested on iOS, the publisher can provide a video streaming in the iPhone, however, when the android wants to subscribe this session, it is not working.
And I use the Playground tools in the opentok, I cannot subscribe to this session also. But I use android to publish, playground works perfectly.
Also, when I use android to publish a session, the playground of the opentok works smoothly. However, when I use iPhone to subscribe it, the console said Unable to connect to the session: check the network connection.
.
Please help.
I used the latest opentok.js and the cordova plugin.
How i can hide the video and show it again? I want to open one Modal View from the videoCall,
I tried with display : none and calling OT.updateViews() but nothing happen
As describe in the TokBox documentation: https://tokbox.com/developer/sdks/ios/background-state.html
It is possible to have an audio session only when put into background.
We tested this be first adding the correct background mode to the plugin.xml and that should be enough already.
When the banckground mode is set to audio it is enough for switching to audio only. Will send a PR in a sec.
TypeError: Cannot convert undefined or null to object
opentok.js:23
at slice ()
at a (http://localhost:8000/opentok.js:23:114633)
at c (http://localhost:8000/opentok.js:23:115132)
at new u (http://localhost:8000/opentok.js:23:115169)
at e.exports (http://localhost:8000/opentok.js:23:114416)
at Object.Node.o.name.c.request (http://localhost:8000/opentok.js:23:121100)
at Object.Node.o.name.c.post (http://localhost:8000/opentok.js:23:121521)
at u (http://localhost:8000/opentok.js:23:317041)
at e (http://localhost:8000/opentok.js:23:317245)
at l (http://localhost:8000/opentok.js:23:317486)
HI
I am using this SDK on my ionic project. but this is not working on iphone
I got this error. Could you help me asap , please ?
I attached error screen
http://prntscr.com/jpj6hw
Thanks for your time
The getPosition()
within OTHelpers.coffee
and the unpublish
in OTSession.coffee
are not aware of the insertMode
of the publisher as described in the JS SDK:
https://tokbox.com/developer/sdks/js/reference/OT.html#initPublisher
To get things working for insertMode
equals append
the getPosition()
should be:
getPosition = (divName) ->
# Get the position of element
pubDiv = document.getElementById(divName)
if !pubDiv then return {}
computedStyle = if window.getComputedStyle then getComputedStyle(pubDiv, null) else {}
width = pubDiv.offsetWidth
height = pubDiv.offsetHeight
curtop = pubDiv.offsetTop
curleft = pubDiv.offsetLeft
while(pubDiv = pubDiv.offsetParent)
curleft += pubDiv.offsetLeft
curtop += pubDiv.offsetTop
# marginTop = parseInt(computedStyle.marginTop) || 0
# marginBottom = parseInt(computedStyle.marginBottom) || 0
# marginLeft = parseInt(computedStyle.marginLeft) || 0
# marginRight = parseInt(computedStyle.marginRight) || 0
#
# return {
# top:curtop + marginTop
# left:curleft + marginLeft
# width:width - (marginLeft + marginRight)
# height:height - (marginTop + marginBottom)
# }
return {
top:curtop
left:curleft
width:width
height:height
}
And the unpublish
in OTSession.coffee
should be :
unpublish:() ->
@alreadyPublishing = false
console.log("JS: Unpublish")
element = document.getElementById( @publisher.domId )
if(element)
# element.parentNode.removeChild(element)
element.removeChild(element.firstChild);
element.classList.remove("OT_root", 'OT_publisher', 'OT_subscriber');
element.removeAttribute("data-streamid");
TBUpdateObjects()
return Cordova.exec(TBSuccess, TBError, OTPlugin, "unpublish", [] )
At the moment the insertMode
is always replace. Creating a different DOM between the plugin and the JS SDK if you are NOT using replace as insertMode
.
Best is to have the same DOM in all situations.
At the moment the OT.updateViews()
or TBUpdateObjects()
gets called on different places in the JS code, like:
So basically when a <video>
element is removed or added to the DOM we would like to call TBUpdateObjects()
. Or when the style / css class changes we would like to call TBUpdateObjects()
as well. So instead of calling this method on different places as mentioned above we could also add an observer to the DOM which listens to removing or adding <video>
elements or changes of it styles and based on that call the TBUpdateObjects()
.
An example implementation adding these observers is found here:
Adding these observers would even be better than the current implementation, because at the moment when the initPublisher()
is called the position is already determined and the TBUpdateObjects()
is already called. But if someone is not sending the containers id, but sends the to be created element into the initPublisher()
, the determination is too soon.
When we would listen to removing/adding <video>
elements or changes to its style / css class into the DOM we would always be on the correct time to determine the position and to call the TBUpdateObjects()
.
So within this plugin we can always add this observer to the <video>
element. This can be done if default UI is inserted or when the end-user sends his own UI we can also add the observer.
When the orientation changes the OT.updateViews()
still needs to be called as is. Also exposing the OT.updateViews()
can be honored for backwards compatibility, but should never be needed anymore.
For iOS everyone needs to add a description to get the application published into the App Store, as stated here. So everyone has to add:
<key>NSCameraUsageDescription</key>
<string>The camera is required to publish video</string>
<key>NSMicrophoneUsageDescription</key>
<string>The microphone is required to publish audio</string>
to the plist
file. We could also adjust the plugin.xml
to do this automatically for every user, like so:
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge" overwrite="true">
<string>The camera is required to publish video</string>
</edit-config>
<edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" mode="merge" overwrite="true" >
<string>The microphone is required to publish audio</string>
</edit-config>
Hi,
We are using cordova-plugin-opentok in one of our projects. And we have an requirement to set the access origin to only *.example.com.
But, while building the application, access-origin is also set to * (there are 2 access origins in our's application's config.xml)
We are assuming it is caused by the opentok plugin from here
Can you please let know if there is a workaround to only set the access origin to *.example.com and still be able to use the opentok plugin without any issues?
Thank you!
If you want a successful video chat experience, you'll likely need to grab your connection id to make sure you don't send signals to yourself etc. Unless you know a better/preferred way of getting your own connection id I would suggest adding this functionality to the 'sessionConnected' function in opentok.js
Something like this works
TBSession.prototype.sessionConnected = function(event) {
var sessionConnectedEvent;
pdebug("sessionConnectedHandler", event);
this.connection = new TBConnection(event.connection);
this.connections[event.connection.connectionId] = this.connection;
sessionConnectedEvent = new TBEvent({
connection: this.connection
});
this.trigger("sessionConnected", sessionConnectedEvent);
return this;
};
Currently nothing is returned on the sessionConnected event
Cheers
Lewis
Hi,
I am using opentok to voice only calls. Everything works as expected, but sound is playing on speaker.
I would like to switch from speaker to earpiece, but seems to be not possible.
I tried to use this plugins, but has not effect on opentok. (https://github.com/alongubkin/audiotoggle)
Is there any way to switch the sound output source?
Thanks,
There are a few event listeners missing in the plugin, like:
We will send a PR with the missing events implemented.
Current behavior
Z-index does not fully work on Android, its either on top or on bottom but overlapping multiple views won't work
Steps to reproduce
What is the current bug behavior?
The plugin uses(by default) SurfaceViews, this particular View does not work as any normal View(More info). Because of that the setZ
or setTranslationZ
won't do much expect putting it in front or behind the WebView
.
What is the expected correct behavior?
That the given z-index puts the right view "in front".
To do so we could use TextureViews(tokbox reference). I am not entirely sure if there is a reason for not using TextureViews
, maybe @msach22 knows something about that.
Both TextureViews
and SurfaceViews
have their pros and cons, but in general you should try to keep the total count of SurfaceViews
down.
I have writen an implementation that makes use of the TextureView
and Matrix
transforms. The implementation makes use of a custom ViewGroup
that will be used instead of the TextureView
(mPublisher.getView()
, mSubscriber.getView()
). The ViewGroup
adds the TextureView
as a child and overides the dispatchDraw
method. We then position and scale the TextureView
using Matrix
transforms and in the dispatchDraw
we use Path
to clip the TextureView
within the given bounding rectangle.
IMPORTANT
This implementation has been written and used in combination with PR49 and PR59.
I can make a PR with this implementation if required, I do belief that this is a needed feature if people want to make properly use of z-ordering on Android.
WIP
Description
Add the ability to share the screen of the application
Proposal
Links / references
We get the following error when doing ionic platform add android.
This however, works rarely but mostly fails. Our connection seems to be fine because other plugins are updated.
Discovered plugin "com.tokbox.cordova.opentok" in config.xml. Adding it to the project
Failed to restore plugin "com.tokbox.cordova.opentok" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin com.tokbox.cordova.opentok@https://github.com/opentok/cordova-plugin-opentok via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module
If a subscriber decides to leave a session, you get a onStreamDestroyed
event. But if you try to unsubscribe and the subscriber leaves the session at the same time, then there is a small chance your app will crash because either the onStreamDestroyed
or the unsubscribe
triggers session exception: Cannot unsubscribe: An unknown Subscriber instance was passed into Session.unsubscribe()
.
That is because they both call the removeStreamView()
natively on the UiThread
which causes them to be async. The chance of this happening is small, but could be prevented by putting a try catch around the unsubscribe I belief.
I will test this further and on success deliver a PR.
Within the JS SDK the initPublisher()
can have a targetElement
parameter, which is described as:
(Optional) The DOM element or the id attribute of the existing DOM element used to determine the location of the Publisher video in the HTML DOM. See the insertMode property of the properties parameter. If you do not specify a targetElement, the application appends a new DOM element to the HTML body.
The application throws an error if an element with an ID set to the targetElement value does not exist in the HTML DOM.
Within this plugin it is only possible (as of now) to send a string
cotaining the id
of the <div>
.
We will send a PR that will allow both as described in the documentation. Because we also need this feature at this moment.
An android user cannot unsubscribe from a publisher's video. The code portion is incomplete. I can propose a fix.
// src/android/OpenTokAndroidPlugin.java (Line 499)
...
} else if (action.equals("unsubscribe")) {
} else if (action.equals("subscribe")) {
...
user@user-laptop:~/Documenten/Projects/open-tok-poc$ cordova plugin add https://github.com/opentok/cordova-plugin-opentok --save
(node:12030) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed to fetch plugin https://github.com/opentok/cordova-plugin-opentok via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module
Current behavior
If you set the resolution
of the initPublisher()
method, as described in the opentok.js docs, to the lowest resolution 320x240
. It won't work in the iOS or Android, since it matches on 352x288
instead of the 320x240
.
Steps to reproduce
Call the initPublisher()
with the lowest resolution like so: initPublisher(targetElement, { resolution: '320x240' })
Example Project
n/a
What is the current bug behavior?
The medium resolution is used in Android and iOS
What is the expected correct behavior?
The lowest resolution should be used on Android and iOS
Relevant logs and/or screenshots
see above
Description
The cordova opentok project is really quite rough around the edges and does not integrate with the opentok-layout-js
library.
Proposal
I am wondering if it is possible or better to simply shim the webrtc API from cordova-plugin-iosrtc
And then use the web opentok library with a wrapper library for any compatibility issues?
Links / references
The Cordova OpenTok plugin uses the native OpenTok SDKs and places native iOS and Android views for the Publisher and Subscriber on top of a WebView. On Android, when you scroll on the WebView, the native video element does not and the video is stuck in its initial position.
Hello, thank you for this plugin but I am having a problem building with Ionic. We are using Ionic Pro and whenever we try to build for Androidwith Ionic Package we get an error on this plugin.
Failed to restore plugin "com.tokbox.cordova.opentok" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin https://github.com/opentok/cordova-plugin-opentok via registry.
I know you have examples using Ionic. Can you help us with this?
Current SDK call to unpublish from session is missing in Android.
} else if (action.equals("unpublish")) {
}
Within the JS SDK docs there is a fitMode
property for the initPublisher()
method. This fitMode
property is not yet implemented / used within this Cordova plugin, but it should.
We have been investigating some other implementation using this and we think it should be possible to add the fitMode
to this plugin. We will send a proposal through a PR.
See:
Any help you can give would be appreciated. I have a fix in my fork, but it makes no sense whatsoever, and I therefore think its a hack...
https://stackoverflow.com/questions/48148816/android-8-26-view-z-index-performs-differently-to-25
Current behavior
When performing a video chat on an Android device, the device camera doesn't auto-focus. When running on an iOS device, the auto-focus works as expected.
Steps to reproduce
- Publish a video on an Ionic app using the Cordova plugin (we are using v3.1.2).
- Make sure you are using the back camera.
- Move the device to be very close and very far away from objects.
What is the current bug behavior?
On Android devices, the focus remains at a fixed spot.
What is the expected correct behavior?
On iOS devices, the focus adjusts as needed.
Relevant logs and/or screenshots
A community post on the TokBox website references setting
Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO
in a custom video capturer class. I tried implementing this in the plugin but it didn't seem to have any effect.
Start a new broadcast with the back facing camera.
Live stream starts with front facing camera. I have checked openTok.js and the property is being set, only ignored.
var publisherOptions = { cameraName: 'back' };
OT.initPublisher('publisher', publisherOptions);
Hello ,
When Open app after click on notification option, Then start to connect video then streamCreated method not work. if work when app open then method work properly. I've tested on android device.
Could you please help me to solve this issue. I've used below code .
session = OT.initSession(apiKey, openTokSessionId);
session.on({
streamCreated: function(event) {
console.log("connection active ..... and Apply my login");
// This method not work when app resume form notification or normal as well. if app already open then work fine.
onStartStreaming();
},
streamDestroyed: function(event) {
onStopStreaming();
}
});
Thanks
Current behavior
Application will crash on iOS 10 when re-making call after disconnecting call.
Steps to reproduce
What is the expected correct behavior?
- (void)session:(OTSession*)mySession streamCreated:(OTStream*)stream{
It is because the observer added by the above streamDictionary method is not remove.
Relevant logs and/or screenshots
streamDictionary = [[NSMutableDictionary alloc] init];
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x174284920 of class OTStream was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x1744208e0> (
<NSKeyValueObservance 0x1702530e0: Observer: 0x1700fa480, Key path: hasAudio, Options: <New: YES, Old: YES, Prior: NO> Context: 0x174284920, Property: 0x17065c620>
<NSKeyValueObservance 0x17025bed0: Observer: 0x1700fa480, Key path: hasVideo, Options: <New: YES, Old: YES, Prior: NO> Context: 0x174284920, Property: 0x17065c3e0>
<NSKeyValueObservance 0x170651100: Observer: 0x1700fa480, Key path: videoDimensions, Options: <New: YES, Old: YES, Prior: NO> Context: 0x174284920, Property: 0x17065c7a0>
<NSKeyValueObservance 0x17025d400: Observer: 0x1700fa480, Key path: videoType, Options: <New: YES, Old: YES, Prior: NO> Context: 0x174284920, Property: 0x17065c920>
)'
*** First throw call stack:
(0x18fd12fd8 0x18e774538 0x18fd12f20 0x19076e110 0x18fbf7e90 0x10010077c 0x100262104 0x1000e3e40 0x1000e51d0 0x1996095d8 0x1995a8c90 0x1995ab108 0x1993dbe48 0x199584878 0x1993a1d00 0x1993a44f8 0x194588e48 0x194589090 0x18fcc1424 0x18fcc0d94 0x18fcbe9a0 0x18fbeed94 0x191658074 0x195ea7130 0x10007108c 0x18ebfd59c)
libc++abi.dylib: terminating with uncaught exception of type NSException
Hi guys,
I'm experiencing a crash in my Ionic-App on an Android 4.4.4 Tablet.
java.lang.NoSuchMethodError: android.view.View.setTranslationZ
This isn't a big suprise since there seem to be a few setTranslationZ calls, which are only supported since API level 21.
Is there any fallback for devices < Android 21? Or would a
if (android.os.Build.VERSION.SDK_INT >= 21)
around the setTranslationZ calls do the trick? I assume this would probably break the Z positioning(?)
EDIT:
We're using crosswalk and the cordova-plugin-opentok version 3.2.1
Best regards
Just like Video calls in other apps like Whatsapp.
Publisher view size :: 90 x 90
Subscriber view size :: full screen
and Publisher view on top of Subscriber view.
I am not able to resize the height & width of videos (both publisher & subscriber).
Here's my sample code for the publisher. I am using updateViews() ...but its still not working.
PLMK. Thx.
`var div = document.createElement('div');
div.setAttribute('id', 'publisherDiv');
div.style.position = "absolute";
div.style.zIndex = "10";
opentokPublisher = TB.initPublisher(apiKey, 'publisherDiv', {
width: 900,
height: 900
});
opentokSession = TB.initSession(apiKey, sessionId);
TB.updateViews();`
Current behavior
When trying to build the android apk after adding the platform correctly, the build fails with an exception. The bug started about two months ago out of nowhere (not nowhere, but probably due to an update, either plugin or dependencies). I have tried to build the project from scratch, on a new machine and the build still fails. When I remove the plugin from my project it builds without a problem. Apparently it has something to do with not resolving dependencies correctly. I have tried adding the maven certs, changing from jcenter to mavencentral, different cordova versions. Please see the logs below.
Versions:
Gradle: 4.6
JVM: 1.8.0_162
Cordova: 7.1.0
Steps to reproduce
Probably due to versions. I can reproduce the bug with the basic video chat sample.
Example Project
Can reproduce on the basic video chat sample
What is the current bug behavior?
Can't build android when running
cordova run android
What is the expected correct behavior?
It should build the apk correctly
Relevant logs and/or screenshots
Error: /home/opentok-cordova-samples/Basic-Video-Chat/platforms/android/gradlew: Command failed with exit code 1 Error output:
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: compileSdkVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:456)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:590)
at com.android.build.gradle.BasePlugin.lambda$null$3(BasePlugin.java:555)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
at com.android.build.gradle.BasePlugin.lambda$createTasks$4(BasePlugin.java:551)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy27.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:75)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:69)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$100(LifecycleProjectEvaluator.java:33)
at org.gradle.configuration.project.LifecycleProjectEvaluator$ConfigureProject.run(LifecycleProjectEvaluator.java:103)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:49)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:651)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:133)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:246)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:165)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:124)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:107)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78)
at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40)
at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:45)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:71)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:45)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:51)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:58)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:33)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
FAILURE: Build failed with an exception.
* Where:
Build file '/home/opentok-cordova-samples/Basic-Video-Chat/platforms/android/app/build.gradle' line: 94
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all dependencies for configuration 'classpath'.
> Could not load module metadata from /home/homeclick/.gradle/caches/modules-2/metadata-2.23/descriptors/com.android.tools.lint/lint-api/24.0.0/22da77b0d76ea8df17298218f3ec1f87/descriptor.bin
I get the following error on my app (previous error was on Basic-Video-Chat):
FAILURE: Build failed with an exception.
* Where:
Build file '/home/sb.bell/platforms/android/build.gradle' line: 96
* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not resolve all dependencies for configuration 'classpath'.
> Could not resolve com.android.tools.lint:lint-api:24.0.0.
Required by:
unspecified:unspecified:unspecified > com.android.tools.build:gradle:1.0.0 > com.android.tools.lint:lint:24.0.0 > com.android.tools.lint:lint-checks:24.0.0
> Could not resolve com.android.tools.lint:lint-api:24.0.0.
> Could not load module metadata from /home/homeclick/.gradle/caches/modules-2/metadata-2.23/descriptors/com.android.tools.lint/lint-api/24.0.0/22da77b0d76ea8df17298218f3ec1f87/descriptor.bin
> Could not resolve org.ow2.asm:asm-analysis:4.0.
Required by:
unspecified:unspecified:unspecified > com.android.tools.build:gradle:1.0.0 > com.android.tools.lint:lint:24.0.0 > com.android.tools.lint:lint-checks:24.0.0
> Could not resolve org.ow2.asm:asm-analysis:4.0.
> Could not parse POM https://jcenter.bintray.com/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.pom
> El contenido no está permitido en el prólogo.
Current behavior
According to the WebSDK, the subscriber should have a
Stream
property.
Steps to reproduce
Just check it
Example Project
Any project using current branch
What is the current bug behavior?
No
Stream
property on subscribers.
What is the expected correct behavior?
A
Stream
property on subscribers
Hi,
Could you please help me or suggest me. How to get calling duration after video calling end.
streamDestroyed return below details but not have call end time or total call duration.
streamDestroyed return response :
{"reason":"clientDisconnected","details":{"connectionId":"A9D69333-C41E-46DB-8A4F-29BC93C57332","creationTime":"Wed Jan 24 17:05:17 GMT+05:30 2018","fps":-999,"hasAudio":true,"hasVideo":true,"name":"","streamId":"D6D51D8E-A652-4326-A795-8F30FB736292"},"defaultPrevented":false}
Please suggest me how to get call history.
Thanks in advance :)
Current behavior
If you switch to a app that claims the Camera, and then return to your own app, then the publisher doesn't reclaim the camera.
Steps to reproduce
- Open your app and start a call(don't forget to publish)
- Switch to an app that uses the Camera and switch back
- Your publisher is black and the subscriber will see the last frame.
Example Project
Any project that uses the 3.2.0 version(or lower probably)
What is the current bug behavior?
The publisher does not reclaim the camera when its possible.
What is the expected correct behavior?
The publisher reclaiming the camera when possible.
Relevant logs and/or screenshots
Also noticed that when you try to
unpublish
orunsubscribe
that you get anOnly the original thread that created a view hierarchy can touch its views.
error and the views don't get removed. Will send in a PR both for the bug above as the second bug.
I noticed lots of PRs were merged on this branch and was trying to test it on our existing ionic app. The app launches fine but ends up with black screen. Dont see any console errors. For me looks like a css issue but our app works fine with this plugin repo from master branch.
Hello,
I need more details of logOT function, this is use in both platform iOS and Android.
Call API : https://hlg.tokbox.com/prod/logging/ClientEvent for send details , params
like : platform, cp_version , action , partner_id , build , source , payload_type, payload, session_id
iOS : - (void)logOT;
Android : - public void logOT();
I tried to find in details on Tokbox doc but not getting proper details related to this api.
Please suggest me why use this method bcz this method called automatically with initSession methods.Also please suggest me impact of this method in can remove this method.
Thanks in Advance :)
It would be nice to be able to place the native camera's in front of or behind the webview based on the given z-index
. Because if we could place the native video elements behind the webview we could also place HTML buttons on top of the video.
We have been successfull in placing the video behind the WebView with the Android and iOS , see branch:
https://github.com/Mediapioniers/cordova-plugin-opentok/tree/feat.cams_behind_webview_z-index
We got this technique from the cordova-plugin-qrscanner and cordova-plugin-iosrtc.
So if you use our branch, the camera will be placed below the WebView based on the z-index
. So to be able to see the cams and buttons, you need make everything transparent in your DOM, for example:
# We can use class OT_root in our repository, but the main things is that the publisher container gets a black background color from OT, this needs to be removed in your CSS!
html, body, .OT_root {
background: transparent !important;
}
# Each publisher and eachsubscriber video element should have display none
.OT_root video {
display: none !important;
}
Also the inserted <video>
tags for publishers and subsscribers in the DOM on Android need to get the style="display: none;
.
When all is set you can have buttons on top of the video. See next screenshot:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.