ember-html5-audio
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
/*jshint node:true*/ | ||
/* eslint-env node */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* jshint node: true */ | ||
/* eslint-env node */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
The MIT License (MIT) | ||
Copyright (c) 2016 | ||
Copyright (c) 2017 | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
{ | ||
"name": "ember-html5-audio", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Ember.js component that serves as a HTML5 audio element.", | ||
"keywords": [ | ||
"ember-addon", | ||
"html5-audio", | ||
"audio" | ||
], | ||
"license": "MIT", | ||
"author": "Yoran Brondsema <yoran@sutori.com>", | ||
"directories": { | ||
@@ -9,42 +16,36 @@ "doc": "doc", | ||
}, | ||
"repository": "https://github.com/hstry/ember-html5-audio", | ||
"scripts": { | ||
"build": "ember build", | ||
"start": "ember server", | ||
"test": "ember try:testall" | ||
"test": "ember try:each" | ||
}, | ||
"repository": "https://github.com/hstry/ember-html5-audio", | ||
"engines": { | ||
"node": ">= 0.10.0" | ||
"dependencies": { | ||
"ember-cli-babel": "^5.1.7" | ||
}, | ||
"author": "Yoran Brondsema <yoran@hstry.co> (http://yoranbrondsema.com)", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"broccoli-asset-rev": "^2.2.0", | ||
"ember-cli": "1.13.15", | ||
"ember-cli-app-version": "^1.0.0", | ||
"ember-cli-content-security-policy": "0.4.0", | ||
"ember-cli-dependency-checker": "^1.1.0", | ||
"ember-cli-htmlbars": "^1.0.1", | ||
"ember-cli-htmlbars-inline-precompile": "^0.3.1", | ||
"ember-cli-ic-ajax": "0.2.4", | ||
"ember-cli-inject-live-reload": "^1.3.1", | ||
"ember-cli-qunit": "^1.0.4", | ||
"ember-cli-release": "0.2.8", | ||
"ember-cli-sri": "^1.2.0", | ||
"broccoli-asset-rev": "^2.4.5", | ||
"ember-ajax": "^2.4.1", | ||
"ember-cli": "2.12.1", | ||
"ember-cli-dependency-checker": "^1.3.0", | ||
"ember-cli-eslint": "^3.0.0", | ||
"ember-cli-htmlbars": "^1.1.1", | ||
"ember-cli-htmlbars-inline-precompile": "^0.3.6", | ||
"ember-cli-inject-live-reload": "^1.4.1", | ||
"ember-cli-qunit": "^3.1.0", | ||
"ember-cli-shims": "^1.0.2", | ||
"ember-cli-sri": "^2.1.0", | ||
"ember-cli-uglify": "^1.2.0", | ||
"ember-data": "1.13.15", | ||
"ember-disable-prototype-extensions": "^1.0.0", | ||
"ember-disable-proxy-controllers": "^1.0.1", | ||
"ember-export-application-global": "^1.0.4", | ||
"ember-sinon": "0.3.0", | ||
"ember-try": "~0.0.8" | ||
"ember-component-inbound-actions": "^1.2.1", | ||
"ember-disable-prototype-extensions": "^1.1.0", | ||
"ember-export-application-global": "^1.0.5", | ||
"ember-load-initializers": "^0.6.0", | ||
"ember-resolver": "^2.0.3", | ||
"ember-sinon": "^0.7.0", | ||
"ember-source": "~2.12.0", | ||
"ember-welcome-page": "^2.0.2", | ||
"loader.js": "^4.2.3" | ||
}, | ||
"keywords": [ | ||
"ember-addon", | ||
"html5-audio", | ||
"audio" | ||
], | ||
"dependencies": { | ||
"ember-cli-babel": "^5.1.5", | ||
"ember-component-inbound-actions": "1.0.0" | ||
"engines": { | ||
"node": ">= 4" | ||
}, | ||
@@ -51,0 +52,0 @@ "ember-addon": { |
@@ -1,54 +0,27 @@ | ||
# Ember-html5-audio | ||
# ember-html5-audio | ||
Ember.js addon that wraps an HTML5 audio (`<audio>`) element and "Emberizes" the events (`loadedmetadata`, `ended`, `durationchange`, etc...) that it sends. | ||
This README outlines the details of collaborating on this Ember addon. | ||
## Installing | ||
## Installation | ||
Install as an Ember-CLI addon: | ||
* `git clone <repository-url>` this repository | ||
* `cd ember-html5-audio` | ||
* `npm install` | ||
* `bower install` | ||
ember install ember-html5-audio | ||
## Running | ||
## Usage | ||
* `ember serve` | ||
* Visit your app at [http://localhost:4200](http://localhost:4200). | ||
// templates/some-template.hbs | ||
{{html5-audio | ||
src="https://link-to-audio-file.ogg" | ||
durationChange=(action 'onDurationChange') | ||
loadedMetadata=(action 'onLoadedMetadata') | ||
ended=(action 'onEnded') | ||
timeUpdate=(action 'onTimeUpdate') | ||
actionReceiver=html5Audio | ||
}} | ||
## Running Tests | ||
### Input | ||
Arguments for the component: | ||
* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions) | ||
* `ember test` | ||
* `ember test --server` | ||
* _src_ | ||
## Building | ||
### Events | ||
It implements some of the events for media elements (see https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events). Please fork and PR if you want to add more supported events. | ||
* `ember build` | ||
* _durationChange_: sent on `durationchange` event (https://developer.mozilla.org/en-US/docs/Web/Events/durationchange) | ||
* _loadedMetadata_: sent on `loadedmetadata` event (https://developer.mozilla.org/en-US/docs/Web/Events/loadedmetadata) | ||
* _ended_: sent on `ended` event | ||
* _timeUpdate_: sent on `timeupdate` event (https://developer.mozilla.org/en-US/docs/Web/Events/timeupdate) | ||
### Actions | ||
We allow actions to be sent to the audio element through the [ember-component-inbound-actions](https://github.com/GavinJoyce/ember-component-inbound-actions) addon. Supported actions: | ||
* _play_ | ||
* _pause_ | ||
* _seek_ | ||
## Building yourself | ||
* `git clone` this repository | ||
* `npm install` | ||
* `bower install` | ||
## Running Tests | ||
* `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions) | ||
* `ember test` | ||
* `ember test --server` | ||
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). |
196074
2272.63%1
-50%21
10.53%9
-18.18%81
-38.64%28
-49.09%- Removed
Updated