• Stars
    star
    311
  • Rank 134,521 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 11 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🎼 ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser

ts-audio · license

ts-audio is an agnostic and easy-to-use library to work with the AudioContext API and create Playlists.

Features

  • Simple API that abstracts the complexity of the AudioContext API
  • Cross-browser support
  • Makes easy to create audio playlist
  • Works with any language that compiles to JavaScript
  • Supports to Types
  • Zero-dependecy

Installation

To install ts-audio, execute:

$ npm install ts-audio

or

$ yarn add ts-audio

Quickstart

ts-audio has two components at its core: Audio and AudioPlaylist. Both components are functions that you can call with certain parameters.

Below is an example of how to use the Audio:

import { Audio } from 'ts-audio';

const audio = Audio({
  file: './song.mp3',
  loop: true,
  volume: 0.2,
});

audio.play();

To use the AudioPlaylist component is also quite simple:

import { AudioPlaylist } from 'ts-audio';

const playlist = AudioPlaylist({
  files: ['./songOne.mp3', './songTwo.mp3', './songThree.mp3'],
  volume: 0.7,
});

playlist.play();

Docs

License

MIT

More Repositories

1

pageAccelerator

A very light solution to load web pages faster
JavaScript
1,206
star
2

pegasus.lua

🚀 Pegasus.lua is an http server to work with web applications written in Lua language.
Lua
417
star
3

transitionEnd

💫 TransitionEnd is an agnostic and cross-browser library to work with transitionend event.
HTML
95
star
4

selecting

🎣 A library that allows you to access the text selected by the user
JavaScript
92
star
5

array.lua

A small library with useful methods to handle Lua's table when it's working like an Array
Lua
60
star
6

computer_science_in_lua

🌛 Implementation of some classic data structures and algorithms in Lua
Lua
50
star
7

serialized-redis

🔑 A solution to have lists and dictionaries serialized using redis-py
Python
47
star
8

Feed

Library that makes easy to parse a RSS feed in your client-side.
JavaScript
34
star
9

str

str is a string module with useful methods that don't exist in Lua's core
Lua
30
star
10

simple_test

👌 A powerful, minimalist and easy-to-use Lua unit testing framework.
Lua
24
star
11

P

It's a cross-browser, agnostic and very lightweight library to help you to work with Promise in JavaScript.
JavaScript
22
star
12

lua-watcher

👀 A Lua module to monitor files from a specific directory
Lua
21
star
13

video-streaming.lua

🎥 Library that implements MontionJPG technique using Lua and Pegasus.lua
Lua
11
star
14

pipe.lua

An implementation of the `pipeline` operator in Lua
Lua
10
star
15

Dadado

A cache that automatically removes the least-recently-used items
TypeScript
9
star
16

ReactFormHelper

🔨 Simple way to build forms in React
TypeScript
9
star
17

Hash.lua

Library with useful methods to handle Lua's table when it's working as a Hash.
Lua
9
star
18

ts-indicator

A tiny reading position indicator library
TypeScript
9
star
19

set-lua

`set-lua` is a complete implementation of the Set data structure in Lua
Lua
9
star
20

node-compressor

A complete solution to compress static files with node
JavaScript
6
star
21

immutable

`immutable` is a tiny library that makes easy to work with immutable data
Lua
5
star
22

Map

Map works like a hashtable but preserving the key insertion order
Lua
4
star
23

setup-lib-js

shell script to create files and directories common to any lib I write in js
Shell
4
star
24

is

Simple way to check whether the current element matched against a selector
JavaScript
4
star
25

SpaceX-Missions

A web application to follow the latest SpaceX missions
TypeScript
3
star
26

slugify.js

A client-side and server-side solution to convert a text to slug
JavaScript
3
star
27

QueryDOM

Simple Chrome extension to search for elements in the DOM.
JavaScript
3
star
28

cache-zap

A cache that stores key-value pairs with a time limit for each entry.
TypeScript
3
star
29

memo.lua

An implementation of the `memoize` technique in Lua
Lua
3
star
30

use-audio-react-hook

A lightweight React hook for managing audio playback
TypeScript
3
star
31

luaDoc

In development
JavaScript
2
star
32

find-by-words

A solution for finding words started by a string. It works well on both front-end and back-end.
JavaScript
2
star
33

jquery-jslide

JavaScript
2
star
34

phonegap-game-of-memory

game of memory built using the api phonegap
JavaScript
2
star
35

maxlength-textarea

complete solution simulation maxlength for textarea element
2
star
36

copy_to_clipboard

A command-line program to copy the contents of any file to the clipboard
Ruby
2
star
37

ts-flatten

A utility function that takes in a value and returns a flatted version of that value
TypeScript
2
star
38

aliasify-imports

A codemod that swaps relative imports for aliases — your go-to buddy for project refactoring! ⚡️💻
JavaScript
2
star
39

tic-tac-toe

A simple game tic tac toe developed in python
Python
1
star
40

c-programming

A repository only for c studies
C
1
star
41

metaprogramming_python

Just playing with metaprogramming in Python
Python
1
star
42

front-end-boilerplate

JavaScript
1
star
43

grpc-server

This is a simple implementation of a gRPC server in Go, created for study purposes.
Go
1
star
44

parser_html

In development
Lua
1
star
45

mousewheel

JavaScript
1
star
46

ts-object-formatter

A small library designed to format object fields in either snake case or camel case
TypeScript
1
star
47

Observable.js

in development
JavaScript
1
star
48

algorithms-playground

My solutions to leetcode and hackerrank problems
JavaScript
1
star
49

Graph-Coloring

Implementation of problem using Graph Color. Developed in 2008.
Java
1
star
50

ts-weighted-random

Picks a random value from a list based on the weights
TypeScript
1
star
51

myTetris

🎮 Tetris game written in vanilla JavaScript (in development)
JavaScript
1
star
52

data_structures_in_js

A collection of data structure developed in JavaScript.
JavaScript
1
star
53

dom-playground

Solutions for DOM problems
HTML
1
star
54

async-playground

Solutions for async problems using Thunks, Promises, Generators, etc.
JavaScript
1
star
55

ts-css-selector

A CSS selector generator
TypeScript
1
star
56

College-Library

Control System library. Using techniques developer, such as MVC and DAO. Developed in 2008.
PHP
1
star
57

dotfiles

💾 My dotfiles
Vim Script
1
star
58

fp_playground

A repository just for Functional Programming studies
JavaScript
1
star
59

HashTable

An experimental implementation of HashTable in Lua just for fun
Lua
1
star
60

whac-a-mole

Implementation of the classic `Whac-A-Mole` game in React
TypeScript
1
star
61

web_worker_playground

Just a simple project to play with Web Worker
JavaScript
1
star
62

gallery

TypeScript
1
star