Giter VIP home page Giter VIP logo

greyspot-new's Introduction

greyspot-new

bind(eventName, listener) — adds a listener function for the specified eventName. See below for the list of possible event names. unbind(eventName) — removes all listener functions previously added for the specified eventName. See below for the list of possible event names. load(url, options) — reloads the iframe element with a new widget specified by the url. All previously added event listeners will continue working. options is an object which allows you to define all possible widget parameters as well as a callback function which will be executed as soon as new widget is ready. See below for detailed list of widget parameters. play() — plays the sound. pause() — pauses the sound. toggle() — toggles the sound. seekTo(milliseconds) — jumps to a certain position in a sound. setVolume(volume) — sets the widget volume to a certain value in the range 0-100. next() — skips to the next sound (only if the widget contains multiple sounds). prev() — skips to the previous sound (only if the widget contains multiple sounds). skip(soundIndex) — jumps to the soundIndex sound, starting from 0 (only if the widget contains multiple sounds).

getVolume(callback) — returns the current volume, in the range of [0, 100]. getDuration(callback) — returns current sound duration in milliseconds. getPosition(callback) — returns current sound position in milliseconds. getSounds(callback) — returns the list of sound objects. getCurrentSound(callback) — returns current sound object. getCurrentSoundIndex(callback) — returns the index of current sound. isPaused(callback) — whether the widget is paused.

SC.Widget.Events.LOAD_PROGRESS — fired periodically while the sound is loading. SC.Widget.Events.PLAY_PROGRESS — fired periodically while the sound is playing. SC.Widget.Events.PLAY — fired when the sound begins to play. SC.Widget.Events.PAUSE — fired when the sound pauses. SC.Widget.Events.FINISH — fired when the sound finishes. SC.Widget.Events.SEEK — fired when the user seeks.

SC.Widget.Events.READY — fired when the widget has loaded its data and is ready to accept external calls. SC.Widget.Events.CLICK_DOWNLOAD — Fired when the user clicks the download button. SC.Widget.Events.CLICK_BUY — Fired when the user clicks the buy button. SC.Widget.Events.OPEN_SHARE_PANEL — Fired when the share panel is opened. This happens when the user clicks the "Share" button, and at the end of the last sound. SC.Widget.Events.ERROR — Fired when an error message is displayed.

greyspot-new's People

Contributors

rnbwd avatar

Watchers

James Cloos 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.