GithubHelp home page GithubHelp logo

00mjk / framer-audioplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benjamindenboer/framer-audioplayer

1.0 0.0 0.0 69.59 MB

AudioPlayer Module for Framer. See the new, Design-compatible Audio module here: https://github.com/benjamindenboer/FramerAudio

License: MIT License

CoffeeScript 100.00%

framer-audioplayer's Introduction

Framer AudioPlayer Module

The AudioPlayer Module for Framer makes it easier for you to prototype with music. It allows you to easily visualize the time, duration, progress, volume and more. It combines the power of the HTML Audio Methods with the flexibility of Components. The AudioPlayer takes care of the common audio interactions for you, while remaining completely customizable.

Examples

A simple audio-player with the current time and time-left visualized.

Prototype of the iOS music app with a customized progress scrubber and volume slider.

Prototype of a material-design music app with multiple songs, next-previous controls and more.

Prototype of the music app, with live time, selection effects and volume adjustments.

AudioPlayer Prototypes Preview


Including the Module

To include the AudioPlayer Class as a module, get the audio.coffee file from within the /module folder and place it within the /modules folder of your prototype.

{AudioPlayer} = require "audio"

Getting Started

The AudioPlayer creates a new Layer for you that includes an audio property.

audio = new AudioPlayer audio: "audio.mp3"
audio.player.play()

By default, it will look for play.png and pause.png images within your /images/ folder. The appearance of the player itself can also be customized. To include a background-image, for instance:

audio = new AudioPlayer 
	audio: "audio.mp3"
	width: 300, height: 200
	image: "images/bg.png"
	borderRadius: 4

audio.center()

Progress and Volume

Progress Bar

Set showProgress to true to visualize the progress of the current song.

audio.showProgress = true

The entire progress bar, including the knob, can be customized.

audio.progressBar.props = 
	width: 556, height: 14
	backgroundColor: "e7e7e7"
	borderRadius: 0

audio.progressBar.knob.props = 
	backgroundColor: "#FF2D55", 
	width: 3, height: 30
	borderRadius: 4

Volume Bar

Set showVolume to true to create a volume slider.

audio.showVolume = true

Just like the progressBar, the appearance of both the bar and the knob can be customized.

audio.volumeBar.props = 
	width: 540, height: 6
	value: 0.75, knobSize: 35

(Note that iOS doesn't allow you to change the volume via JavaScript, so when previewing on iOS Devices, the volumeBar may be unresponsive)


Showing Time

Time

Set showTime to true. The layer properties (audio.time) and formatting (audio.timeStyle) can be changed as well.

audio.showTime = true

TimeLeft

Set showTimeLeft to true.

audio.showTimeLeft = true

timeStyle targets both of the times defined by showTime and showTimeLeft.

audio.timeStyle = { "font-size": "14px", "color": "#888" }

AudioPlayer Previews


framer-audioplayer's People

Contributors

eelco avatar karelvuong avatar

Stargazers

 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.