Giter VIP home page Giter VIP logo

angular-jplayer-wrapper's Introduction

angular-jplayer-wrapper

Simple wrapper around jPlayer for angularJS.

API

Services

  • jPlayer - provides wrapper-class for jPlayer instance;
  • jPlayerFactory - creates new players;

Methods

jPlayerFactory

jPlayerFactory::createPlayer(selector, media): jPlayer - creates new player instance and puts it into element specified by selector; Parameters: selector - valid jQuery selector, media - valid jPlayer media object.

jPlayerFactory::createLiveStreamPlayer(selector, media): jPlayer - same as jPlayerFactory::createPlayer, except design for live streams;

jPlayer

jPlayer::play([position]): jPlayer - if position not set resume playing otherwise play from specified position;

jPlayer::pause([position]): jPlayer - if position not set pause playing otherwise move to position and pause;

jPlayer::setMedia(media): jPlayer - set media for player, where media valid jPlayer media-object;

jPlayer::preload(): jPlayer - starts loading of media;

jPlayer::pauseOthers([position]): jPlayer - calls jPlayer::pause(position) on other players;

jPlayer::clearMedia(): jPlayer - clears media;

jPlayer::stop(): jPlayer - stops player;

jPlayer::tellOthers(command, [options, [filterFunction]]): jPlayer - tells others to do the command with options, "others" are filtered by filterFunction;

jPlayer::getOption(optionName): mixed - get value of an option with specified name;

jPlayer::setOption(optionName, optionValue): jPlayer - set value for option with specified name;

jPlayer::seekAndPlay(positionInPercents): jPlayer - seek to position specified in percents and play;

jPlayer::destroy(): null - destroy player;

jPlayer::mute(): jPlayer - mute player;

jPlayer::unmute(): jPlayer - unmute player;

jPlayer::isMuted(): bool - check whether player is muted or not;

jPlayer::muteToggle(): bool - toggle mute mode and return new value;

jPlayer::isPlaying(): bool - check whether player is playing or not;

jPlayer::toggle(): bool - toggle playing and return new value;

jPlayer::on(eventName, eventCallback): jPlayer - add event handler;

jPlayer::once(eventName, eventCallback): jPlayer - set event handler;

jPlayer::isReady(): bool - check whether player is ready or not;

Events

See jPlayer event list, the only difference: in this wrapper all event names are camelized(in camelCase) and callback signature is function(originalEvent, wrappedPlayer).

angular-jplayer-wrapper's People

Contributors

saksmt avatar

Watchers

 avatar  avatar

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.