Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saksmt/angular-jplayer-wrapper
Simple wrapper around jPlayer for angular
https://github.com/saksmt/angular-jplayer-wrapper
Last synced: about 2 months ago
JSON representation
Simple wrapper around jPlayer for angular
- Host: GitHub
- URL: https://github.com/saksmt/angular-jplayer-wrapper
- Owner: saksmt
- Created: 2014-12-29T11:10:09.000Z (almost 10 years ago)
- Default Branch: develop
- Last Pushed: 2014-12-31T14:59:47.000Z (almost 10 years ago)
- Last Synced: 2024-10-11T17:28:00.395Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 152 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
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)`.