Forum Discussion

ritaandti's avatar
ritaandti
Copper Contributor
Apr 10, 2025

Why did this code quit working.

Why did this code quit working.

Why did this code quit working.

I have 1000+ files that have worked with this code since 2020. All of a sudden 2 days ago, none of them work. What is the reason why it quit working?

1 Reply

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    From what I can see, the code is trying to embed and autoplay a video hosted on OneDrive using the HTML <video> element with a SOURCE src URL that points to a OneDrive download link.

    Here's why it probably stopped working recently (despite working since 2020):

    OneDrive Changed Its Link Behavior

    Microsoft has recently updated OneDrive's public sharing or download links, and these changes affect. OneDrive does not provide direct access to the .mp4 file anymore.

    The embed URL is meant for use in an <iframe>, not for media streaming.

    Here's an attempt to correct the HTML code you sent in the screenshot (Same Structure, Just Fixed Link).

    <video width="100%" controls autoplay height="auto"> <source src="https://onedrive.live.com/embed?cid=0998DCCDA11D8686&resid=0998DCCDA11D8686%21239969&authkey=AIChDls1E7b6U2M" type="video/mp4"> Your browser does not support HTML5 video. Please upgrade your browser to see the video. </video>

    If you want Using OneDrive Embed Format

    <iframe src="https://onedrive.live.com/embed?cid=0998DCCDA11D8686&resid=0998DCCDA11D8686%21239969&authkey=AIChDls1E7b6U2M" width="100%" height="auto" frameborder="0" scrolling="no" allowfullscreen> </iframe>

    If you want it to scale dynamically:

    <div style="position:relative; padding-bottom:56.25%; height:0; overflow:hidden;"> <iframe src="https://onedrive.live.com/embed?cid=0998DCCDA11D8686&resid=0998DCCDA11D8686%21239969&authkey=AIChDls1E7b6U2M" style="position:absolute; top:0; left:0; width:100%; height:100%;" frameborder="0" scrolling="no" allowfullscreen> </iframe> </div>

     

    My answers are voluntary and without guarantee!

    I hope that I understood it correctly 🙂 and that it helps you in your project.

     

Resources