Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Couple issues with 1.21.0 version #5443

Open
juanmanuelpuhl opened this issue Nov 26, 2024 · 11 comments
Open

Couple issues with 1.21.0 version #5443

juanmanuelpuhl opened this issue Nov 26, 2024 · 11 comments

Comments

@juanmanuelpuhl
Copy link

Hi, I recently updated to latest version 1.21.0 and I'm seeing a couple errors. Also I need help with the captions feature.

Issues:

  1. usePropsFor(RaiseHandButton) return type is undefined. I needed to add a cast to RaiseHandButtonProps, it seems like the type declaration is missing for that component.
  2. Typo in COMPOSITE_LOCALE_EN_US.strings.call.captionsSettingsCaptionLanguageDropdownInfoText. It says "Captions will appear in this langugage."

Regarding closed captions. I made my own captions settings modal, to be able to set the spoken language and the captions language. I followed some of the code you are already using in the call composite, but sometimes I see an error when trying to set a caption language:

Call.feature: Set caption language failed. Teams premium license is needed to use this feature.

The message seems clear, but what I don't understand is that if I refresh the page, and try again, the message doesn't appear and the caption language is set accordingly. I've never seen this happening in previous versions (we imported the modal directly then).

What I'm doing to get the data we need is:

  1. Get the call client.
  2. Get the call.
  3. With the call id, get the captions feature from the call client. This returns supportedCaptionLanguage, supportedSpokenLanguages, currentSpokenLanguage and currentCaptionLanguage that we need to populate the dropdowns.
  4. Call this fragment of code when we click on Confirm button
adapter.setSpokenLanguage(selectedSpokenLanguage.key)
adapter.setCaptionLanguage(selectedCaptionLanguage.key)

I'm not sure if there's something I need to take into account, or initialize before start using this feature.

Some data of the libraries:

 "@azure/communication-calling": "1.28.4",
 "@azure/communication-react": "1.21.0",
@mgamis-msft
Copy link
Contributor

Hi @juanmanuelpuhl, thank you for filing these 2 issues with the details and version. We are currently looking into both of these and get back to you shortly.

@mgamis-msft
Copy link
Contributor

mgamis-msft commented Nov 27, 2024

@juanmanuelpuhl We have fixes for the first 2 issues you found in this #5448. These fixes will be part of our next release for 1.22.0-beta.1 and 1.22.0.
We are still investigating the error when setting caption language. I was wondering if you are calling adapter.setCaptionLanguage(selectedCaptionLanguage.key) in a Teams interop call with another Teams user.

@juanmanuelpuhl
Copy link
Author

@mgamis-msft thank you for the update. Regarding the captions, yes. I'm doing Teams interop with a Teams user

@mgamis-msft
Copy link
Contributor

@juanmanuelpuhl The user might not have the capability to set caption language at times. Could you add a listener to your adapter when you create it to log the setCaptionLanguage capability like so?

  const afterCallAdapterCreate = useCallback(async (adapter: CallAdapter): Promise<CallAdapter> => {
    adapter.onStateChange((state: CallAdapterState) => {
      console.log(
        'Capability to set caption language: ',
        state.call?.capabilitiesFeature?.capabilities.setCaptionLanguage
      );
    });
    return adapter;
  }, []);

  const adapter = useAzureCommunicationCallAdapter(
    {
      ...adapterArgs,
      userId,
      locator,
      options: callAdapterOptions
    },
    afterCallAdapterCreate
  );

The object we are trying to log is of type:

{
    isPresent: boolean;
    reason: CapabilityResolutionReason;
}

If the setCaptionLanguage capability is not present we should be able to know the reason. I suspect there might be a license missing to use captions in your Teams tenant.

Do you have access to your Teams admin center? Something worth double-checking is this following meeting setting:
Image

@juanmanuelpuhl
Copy link
Author

Thanks @mgamis-msft . I'll be checking that today and let you know

@juanmanuelpuhl
Copy link
Author

juanmanuelpuhl commented Dec 10, 2024

Hi @mgamis-msft sorry for the delay, I have some results:

regarding Teams admin center, the setting is the same as you shared in the screenshot.
regarding the logs, I see it starts by printing undefined, and after some seconds it changes to

{
   isPresent: false,
   reason: "TeamsPremiumLicenseRestricted"
}

after a few extra seconds it changes to

{
   isPresent:  true,
   reason: "Capable"
}

and finally when the teams user joins, it changes back to

{
   isPresent: false,
   reason: "TeamsPremiumLicenseRestricted"
}

If the acs user then reloads the page while the Teams user remains there, the changes are:
undefined -> TeamsPremiumLicenseRestricted -> Capable, and it remains the same then, allowing me to change the captions language.
Re-joining with the Teams user doesn't seem to change anything, the status remains in Capable

@mgamis-msft
Copy link
Contributor

Thanks for sharing the logs and the timeline of this issue @juanmanuelpuhl. Our captions engineer is currently taking a deep look at this issue and we'll let you know the cause and the fix for it.

@edwardlee-msft
Copy link
Contributor

Hi @juanmanuelpuhl ,
I am actively working on your issue and conducting a series of tests, can you confirm some details here:

When you indicated I've never seen this happening in previous versions (we imported the modal directly then)., did you have the ACS user join the call before the Teams user like how you are doing now? And was setCaptionsLanguage working? From my testing, this also does not work unless the ACS user leaves the call and rejoins.

@edwardlee-msft
Copy link
Contributor

Hi @juanmanuelpuhl,

We have a fix incoming!
The expected behaviour is users should not be able to utilize setCaptionLanguage if the Meeting was not created by a Teams user with Teams Premium License. So in your case, when the user rejoins the call, they technically should not be able to setCaptionLanguage unless your meeting was created by a Teams Premium License user.

You can learn more about Teams Premium licensing here: Microsoft Teams Premium Licensing

Thank you for filing this issue! We will provide updates on the status of the fix and when to expect it in a future comment!

@juanmanuelpuhl
Copy link
Author

juanmanuelpuhl commented Dec 12, 2024

Thanks for the response @edwardlee-msft

When you indicated I've never seen this happening in previous versions (we imported the modal directly then)., did you have the ACS user join the call before the Teams user like how you are doing now? And was setCaptionsLanguage working?

The process was the same, yes. The ACS user joins, but as the call is not started, he stays in the lobby until the Teams user joins. I haven't tried again in older versions, but I remember I was able to change the captions language.

The expected behaviour is users should not be able to utilize setCaptionLanguage if the Meeting was not created by a Teams user with Teams Premium License. So in your case, when the user rejoins the call, they technically should not be able to setCaptionLanguage unless your meeting was created by a Teams Premium License user.

Nice, thanks. Will this change hide the captions language selector when the user doesn't have the capability? I was able to hide it from my custom component, but haven't seen a way to hide it in the modal that is opened when using the three dots in the captions container.

I mean here

Image

@edwardlee-msft
Copy link
Contributor

Thank you for confirming @juanmanuelpuhl .

As for the caption language dropdown, that's a good call out! We have an active work-item to hide the dropdown in our modal when it's not available. One of our engineers is actively working to deliver it to our future release soon.

We will keep this issue open until we have these changes available in one our public releases.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants