Git Product home page Git Product logo

custom-media-element's People

Contributors

github-actions[bot] avatar luwes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

custom-media-element's Issues

Custom Media Element

Custom media element is the successor of https://github.com/muxinc/custom-video-element.
It adds a way to easily extend the <audio> element in addition to the <video> element.

Several issues in custom-video-element are fixed in custom-media-element and adds a few new features.

  • fixes the bug of attributes not being available in an eagerly upgraded custom video element
  • the handling of attributes / properties is different than before in that it doesn't set properties by default in the attribute callback causing a potential endless loop if the override property was not gated e.g. if (this.loop == value) return;
  • the observed attributes are limited to a static list that can be added on by the extending class.
  • events can be attached before the custom media element is upgraded
  • properties can be set before the custom media element is upgraded
  • default templates and Events list is overridable
  • adds CSS vars for object-fit and captions transform / transition
    object-fit: var(--media-object-fit, contain);
    object-position: var(--media-object-position, 50% 50%);
    }
    video::-webkit-media-text-track-container {
    transform: var(--media-webkit-text-track-transform);
    transition: var(--media-webkit-text-track-transition);
    }
  • adds a CSS part video or audio for internal styling
  • supports extending a custom built-in (e.g. castable-video)
  • browser API's are gated so SSR (e.g. Next.js) doesn't break

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.