# P5 and DOM file types

**URL:** <https://discourse.processing.org/t/p5-and-dom-file-types/30336>\
**Category:** Coding Questions\
**Created:** [May 28, 2021, 2:05pm UTC](https://discourse.processing.org/t/p5-and-dom-file-types/30336 "2021-05-28T14:05:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karenmani](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/karenmani/32/13359_2.png) [@karenmani](https://discourse.processing.org/u/karenmani)\
**Post date:** [May 28, 2021, 2:05pm UTC](https://discourse.processing.org/t/p5-and-dom-file-types/30336/1 "2021-05-28T14:05:15Z")

</div>

I’m trying to create a video player using DOM and video files to createVideo() in p5. When I’m setting my program to support multiple file types, I have to include each format of the file in the repository or file directory as well, right?

Additionally, what file types should I include to ensure my player works on Chrome, Firefox, Safari, Internet Explorer, etc.? What formats besides mp4 should I use?

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [May 28, 2021, 4:52pm UTC](https://discourse.processing.org/t/p5-and-dom-file-types/30336/2 "2021-05-28T16:52:26Z")

</div>

same as the other topic I changed the topic category.

you can find info on MDN - in their example they use webm and mp4. but note that webm has different standards (vp8/vp9) and vp9 may not be supported by all the browsers.

> **[Video and Audio APIs - Learn web development | MDN](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Video_and_audio_APIs)**
>
> I think we've taught you enough in this article. The HTMLMediaElement API makes a wealth of functionality available for creating simple video and audio players, and that's only the tip of the iceberg. See the "See also" section below for links to...
