Skip to content
This repository has been archived by the owner on Aug 7, 2018. It is now read-only.

akaravashkin/listen-button-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Listen Button Widget

Widget that allows people to get access to your media by the phone. Specify media link and receive number to call. Check this Demo

Usage

You can download minified widget.js file from dist folder. Simply add this script on your page:

<script src="/dist/widget.js"></script>

Place the button anywhere you need and script will parse it automatically:

<div class="listen-button-widget" data-src="https://yourdomain.com/my_media.mp3"></div>

Customization

Widget supports two parameters: data-src and data-text;

Programmatic usage

You can manually initialize the declarative buttons:

window.ListenButtonWidget.init();

or add optional customization:

window.ListenButtonWidget.init('.my-custom-container', {
  src: 'https://storage.carrierx.com/c/f1f0f514-d5b8-4ed1-8ba1-7e30068671f4/santa_welcome.mp3',
  text: 'I\'m a programmer'
});

Styling

Customize everything you need through CSS:

.listen-button-widget .lbw-listen-button {
  background-color: #17b517;
}

Build from source

Use NPM or Yarn:

yarn build

About

Widget that allows people to get access to your media by the phone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published