Code Monkey home page Code Monkey logo

slant-player's Introduction

slant-player

Slant video player component.

screenshot

install

$ component install littlstar/slant-player

usage

var Player = require('slant-player');
var el = document.querySelector('#player');
var player = new Player(el, {src: 'video.mp4'});

player.render();

api

Player (parent, opts)

new Player(parent, {src: 'video.mp4'});
  • parent - Parent DOM Element
  • opts - Player options where an option is:
    • width - player width
    • height - player height
    • src - Video source
    • controls - slant-controls options

#play

Plays the video player

player.play();

#pause

Pauses the video player

player.pause();

#volume(level)

Sets the video player volume level

player.volume(0.8);

#mute

Muts the video player volume

player.mute();

#seek(seconds)

Seek to position in seconds

player.seek(34);

#use(fn)

Use a plugin with the player

player.use(plugin());

#show

Shows the video player

player.show();

#hide

Hides the video player

player.hide();

#render

Renders the video player in the DOM

player.render();

#destroy

Destroys the video player in view

player.destroy();

license

MIT

slant-player's People

Contributors

jwerle avatar

Stargazers

Tony Mugavero avatar  avatar

Watchers

Tony Mugavero avatar James Cloos avatar  avatar Dave Lucia avatar  avatar Tyler Dinner avatar Eric Jiang avatar Vanessa Pyne avatar Madeline avatar shi_xx avatar Matt Collado avatar Michael Bürge avatar  avatar Sunny avatar  avatar Andrew Grathwohl avatar  avatar Prashanth Balasubramani avatar Isabel Lee avatar  avatar

Forkers

laocan

slant-player's Issues

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.