# Controlling a video file with JavaScript

**URL:** <https://forum.kirupa.com/t/controlling-a-video-file-with-javascript/639609>\
**Category:** flash\
**Created:** [April 3, 2019, 1:41am UTC](https://forum.kirupa.com/t/controlling-a-video-file-with-javascript/639609 "2019-04-03T01:41:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jthatcher](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jthatcher/32/9566_2.png) [@jthatcher](https://forum.kirupa.com/u/jthatcher)\
**Post date:** [April 3, 2019, 1:41am UTC](https://forum.kirupa.com/t/controlling-a-video-file-with-javascript/639609/1 "2019-04-03T01:41:30Z")

</div>

Hello my new best friends. I’m a tenderfoot initiate into your group. I have been searching for a method to convert SWFs into HTML. One idea I’ve considered is to use QuickTime to convert them into MOV video files, then use JavaScript to restore user control. My question is, is that possible. For instance, are there JavaScript commands that will stop playback at designated frames, resume playback when the screen is clicked, and goto a specific frame after a button is clicked.

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [April 3, 2019, 4:59am UTC](https://forum.kirupa.com/t/controlling-a-video-file-with-javascript/639609/2 "2019-04-03T04:59:46Z")

</div>

If you use the `video` element in HTML to display the video, you have a lot of control over the playback. This article goes into more detail on relevant methods you can rely on: [https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side\_web\_APIs/Video\_and\_audio\_APIs](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Video_and_audio_APIs)

One thing to note is that playback is time-based and not frame-based. You can jump to a particular time value, but you can’t jump to an individual frame in the traditional Flash/SWF sense 🙂
