Correct way to import Typescript enumerations

I’ve got an Angular 11 app and I’m using version 1.0.3 of the Web Video SDK. I haven’t figured out how to correctly import the contsant enumerations into my app to both satisfy the build-time, VS-code, and the run-time execution. Can anyone offer guidance on the correct import statement / configuration to gain access to the constants, for example, Video_360P, and for the time being, I’m using their numeric equivalents i.e. 2.

Hey @victor.aprea ,

Have you tried referencing the sample app included in the download on your Video SDK app, which is react based?

We will be developing an Angular sample app in the future.

Thanks,
Tommy

Yes… the React application declares an enum locally in src/feature/video/video-layout-helper.ts starting on line 58… it would seem to me that the library should expose the enumeration so that it’s available through an import statement. Without that, if your library enums change things could get “interesting” … I’d rather keep things boring if possible. Maybe you guys can put it on your 1.0.4 road map?

Hey @victor.aprea ,

I agree, I will share this with the team and see if we can include in 1.0.4 or another upcoming release. (ZOOM-274941)

Thanks,
Tommy

1 Like

Hey @victor.aprea ,

The following article may be able to help;

It seems that as of TypeScript 2.9, it is now easy and possible to import a module’s types directly into the project. :slight_smile:

That being said, we will export the constant enumerations in VideoSDK in a future release.

Thanks,
Tommy

Hey @victor.aprea ,

Enums will be included in our 1.1.0 Video SDK Web release.

Thanks,
Tommy

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.