How can I resize an embedded video on GitHub flavoured markdown?

Viewed 46

I recently added a video on a readme file on GitHub. Although I was able to drag and drop the video, it automatically fills the entire width of the readme. I was wondering if there was a way to adjust the height and width the video?

1 Answers

I'm not entirely sure what you mean by "I was able to drag and drop the video", but assuming that generates a <video> tag you should be able to add a height or width attribute to it, e.g. as shown in the MDN documentation:

<video controls width="250">
           <!-- ^^^^^^^^^^^ -->
    <source src="/media/cc0-videos/flower.webm" type="video/webm">

    <source src="/media/cc0-videos/flower.mp4" type="video/mp4">

    Sorry, your browser doesn't support embedded videos.
</video>
Related