Code Monkey home page Code Monkey logo

word-overlay-video-editor's Introduction

Word Overlay Video Editor

Table of Contents

Getting Started

To get this project started on your local machine:

  1. In the root folder of the project, run:
yarn install
  1. Start the CORS-proxy server by running:
yarn server
  1. In another terminal window, build the app and deploy it on your local machine by running
yarn deploy

Prerequisites

If you do not already have serve installed globally, you will need to install it before running the project. Do so by running:

  yarn global add serve

Functional Requirements

  • Pulls the data from the given text files and finds the 5 most common words across them:

    • To store the data from each call I used react-query.
    • On each succesful call, we store the text of the document in a redux store, pages responsible for storing our text data.
    • When the success status from each call is true, we dispatch an event to a redux reducer in charge of the state for the editor, which uses a heap and hashmap to find the 5 most frequent words across the three text files. There are likely already libraries available for this, and would likely opt to use prebuilt libraries in a production setting.
    • One unanticipated hurdle for this requirement was the requested documents did not have CORS access headers set on them. To solve this, I proxied the calls from the browser through a local server. In production, if given the ability to add Access-Control-Orgin headers to these resources, they should be added. If that's not the case, a more robust proxy service would need to be employed/built.
  • Render 5 words over video player, each with:

    • a button to toggle its visibility
      • I hooked into reducer for the editor state to modify the ui state of each word.
    • drag and drop functionality within the video player
      • I used react-dnd and redux to keep track of each word's position, color, and visibility.
    • a menu displaying x-y coordinates after 2 seconds
      • I used react-create-portal to render an element outside of the DOM hierarchy, to break out of editor's boundaries.
      • I used local component state on each word to keep track of a timer to display the tooltip.
    • behavior which cycles through colors when clicked, but not dragged
      • I used the editor state mentioned above and dispatched actions to the editor's reducer on click.
  • Known Issues
    • Word components can overlap significantly. Their transparent background can lead to a frustrating and unintuitive experience. I have a feeling SVG elements may solve this, but would need to look into this further. Given more time, it would make sense to give some ability to reorder the layering of the words, in the event that the user wants to achieve a specific effect.

word-overlay-video-editor's People

Contributors

archaengel avatar

Watchers

 avatar  avatar

Forkers

kauandotnet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.