Closed Maksim2030 closed 4 years ago
Hi,
Are you still having issues with this? I was unable to access https://docs.microsoft.com/en-us/stream/embed-video-oembed
Have you tried using the official SharePoint stream web part instead? https://docs.microsoft.com/en-us/stream/embed-video-sharepoint @IlyeniaMaksim
This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open the issue.
Category
I'm trying to get content from 'https://web.microsoftstream.com/oembed' endpoint (https://docs.microsoft.com/en-us/stream/embed-video-oembed) using 'HttpClient' from "@microsoft/sp-http" on SharePoint modern page and getting an error: 'Access to fetch at 'https://web.microsoftstream.com/oembed?url=https%3A%2F%2Fweb.microsoftstream.com%2Fvideo%2Ff6df81b2-9438-4154-b32c-c023ebb2a4e3' from origin 'https://{tenant}.sharepoint.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.'
Steps to Reproduce
let url = 'https://web.microsoftstream.com/oembed?url=https%3A%2F%2Fweb.microsoftstream.com%2Fvideo%2Ff6df81b2-9438-4154-b32c-c023ebb2a4e3'; this.context.httpClient .get(url, HttpClient.configurations.v1) .then((response: any) =>{ // cors error })