I’m currently developing a Teams App and came across this sample:
const appContentUrl = "https://www.bing.com/";
microsoftTeams.meeting.shareAppContentToStage((err, result) => {
if (result) {
// handle success
}
if (err) {
// handle error
}
}, appContentUrl);
Source: https://learn.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/build-apps-for-teams-meeting-stage?tabs=desktop#example
When trying to show bing.com on meeting stage, I currently get the following error:
API is not supported in current context-Provided URL is invalid
Just for testing this, I’m allowing all domains on my manifest.
"validDomains": [
"*"
],
Is it posible to show directly on meeting stage any URL (using microsoftTeams.meeting.shareAppContentToStage
) or can I just show an URL between my Teams App?
This works just fine for me:
microsoftTeams.meeting.shareAppContentToStage((error) => {
if (error) {
// handle error
}
}, `${window.location.origin}`);