Forum Discussion
ShreyaAgrawal
Microsoft
Oct 23, 2023Embed Code - would it change if the video is edited ?
I am trying to use Embed code from Stream video into our webpage using an iFrame , following this doc Embedding Stream content in third-party sites - Microsoft Support The video plays perfectly fi...
Marc Mroz
Microsoft
Oct 26, 2023The embed code uses the document id. That stays the same as long as you keep the video in the same site. If you move the video to a new site or out of OneDrive to a site or different persons OneDrive the document id will change and break the embed code.
If you re upload the same named file to the same folder and tell SP or OD to replace the other file it keeps the doc id as well and embed code working even through it’s a new file.
If you re upload the same named file to the same folder and tell SP or OD to replace the other file it keeps the doc id as well and embed code working even through it’s a new file.
ShreyaAgrawal
Microsoft
Oct 26, 2023Thank you. This is helpful.
Can you elaborate on question 3 ? Is there any API or any way possible to get the embed code of a stream video even if the video filename or the location keeps changing ?
Can you elaborate on question 3 ? Is there any API or any way possible to get the embed code of a stream video even if the video filename or the location keeps changing ?
- Marc MrozOct 26, 2023
Microsoft
The only way the Graph API can know of a specific file is by drive id and drive item. Those change under the same circumstances I described above.
So file name change is fine, move to new folder within the same site is fine, the embed code and drive item and drive id don’t change. But if you move across sites the both the emended code and graph drive item and drive id will change.
To track a file across site moves the only thing I can think of is to run a search for the file and hope you find it. There is no universal id for SP or ODB files, the id is unique within a site only.