OpenVidu Angular

Hi all,

I’d like to use openvidu-angular2.14.

The problem is that the library’s module imports BrowserModule and BrowserAnimationModule.
As far as I know, libraries should import only CommonModule.

Due to importing BrowserModule, the library cannot be used in feature/lazy loaded modules, because there would be duplicated import of BrowserModule.

Anyone else expected the issue, and has a workaround maybe?

Thanks

Hello @Balint_Dorner,

I don’t know if this change would have any colateral effect in openvidu-angular.

Basically, you mean openvidu-angular should remove this two imports right?

Could you test if this works?

The steps to follow are:

1.Clone OpenVidu Call
2. Remove BrowserModule and BrowserAnimationModule imports
3. Create library like

    cd openvidu-call/openvidu-call-front
    npm install
    npm run build:openvidu-angular
    npm run pack:openvidu-angular
  1. Install tar.gz generated in your app. You can find it in openvidu-call/openvidu-call-front/dist

Hi @CSantosM,

It would not have any collateral effect, but it would work properly with lazy loaded modules as well. (Browser and BrowserAnimationModule should only be imported once in an application in App/Core module, otherwise CommonModule is the preferred one.

See at

Should I import BrowserModule or CommonModule ? link

T

Thanks,
Balint

Hi @CSantosM

Have you had possibility to take a look at the above?
If so, wheat do you think?

Thanks
Balint

Check changes in commit