Temasys plugin and Angular 4

59 views
Skip to first unread message

Marcel

unread,
Dec 11, 2017, 11:34:43 AM12/11/17
to Temasys WebRTC Plugin
Hi, 

We are currently reviewing the temasys plugin. But we run into some problems when using it together with angular 4 with typescript.

AdapterJS is undefined in angular. We tried two ways:

Loading the Adapter.js file from within angular
import 'adapterjs/publish/adapter.debug.js';

And from a script tag 
<script type="text/javascript" src="//cdn.temasys.io/adapterjs/0.15.x/adapter.min.js"></script>

Can you please explain how to get the temasys plugin working in angular 4 with typescript?

Kind regards
Marcel

romme...@temasys.com.sg

unread,
Dec 13, 2017, 2:14:28 AM12/13/17
to Temasys WebRTC Plugin
Hi Marcel,

Can you try to follow the steps below to import AdapterJS:

1- Import the AdapterJS library from their .angular-cli.json file:

...
"apps": [{
  "scripts": [
     "external-libs/adapter.debug.js"
    ],
    ...
}]
...

2- Declare the AdapterJS library and would be able to use all the global attributes in it (scoped to the window scope) by doing this in the app.component.ts:

declare var AdapterJS: any;

Please tell us if this works.

Regards,
Rommel

Marcel

unread,
Dec 13, 2017, 10:35:45 AM12/13/17
to Temasys WebRTC Plugin
Hi Rommel,

I got it to work doing the following. 
let AdapterJS = require('adapterjs/publish/adapter.debug.js');

Now we are getting the webRTCReady event.

Do I need to add the "normal" adapter.js beside the temasys adapter?

romme...@temasys.com.sg

unread,
Dec 13, 2017, 8:24:25 PM12/13/17
to Temasys WebRTC Plugin
HI Marcel,

There is no need as you are already using our AdapterJS.

Marcel

unread,
Dec 15, 2017, 6:20:11 AM12/15/17
to Temasys WebRTC Plugin
Hi Rommel,

Does Temasys plugin support the new webrtc api with promises or only the old version with callbacks?
And is this the same for the commercial version of the plugin?

Kind Regards
Marcel 

Jacques-Olivier Haché

unread,
Dec 16, 2017, 7:04:36 AM12/16/17
to Temasys WebRTC Plugin
Hi Marcel,

The plugin only support callback APIs.
AJS does add support for some promise APIs, for example requestUserMedia, but the list is fairly limited.

The free and commercial plugins have the same APIs.

Regards,
J-O
Reply all
Reply to author
Forward
0 new messages