Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 3.0.8 #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ion-sound",
"version": "3.0.7",
"version": "3.0.8",
"homepage": "https://github.com/IonDen/ion.sound",
"authors": [
{
Expand Down
3 changes: 3 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Ion.Sound Update History

### Version 3.0.8. March 21, 2017
* Implemented request #52 - option to enable browser caching by Gorlum https://github.com/supernova-ws

### Version 3.0.7. March 06, 2016
* Fixed bug #71

Expand Down
4 changes: 2 additions & 2 deletions ion-sound.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ion-sound",
"version": "3.0.7",
"version": "3.0.8",
"title": "Ion.Sound",
"description": "JavaScript plugin for playing sounds on user actions and events. Today websites are full of events (new mail, new chat-message, content update etc.). Often it is not enough to indicate this events only visually to get user attention. You need sounds! This library, made for playing small sounds, will help you with this task.",
"keywords": [
Expand Down Expand Up @@ -32,5 +32,5 @@
"homepage": "https://github.com/IonDen/ion.sound",
"docs": "https://github.com/IonDen/ion.sound/blob/master/readme.md",
"demo": "http://ionden.com/a/plugins/ion.sound/en.html",
"download": "http://ionden.com/a/plugins/ion.sound/ion.sound-3.0.7.zip"
"download": "https://github.com/supernova-ws/ion.sound/archive/master.zip"
}
9 changes: 7 additions & 2 deletions js/ion.sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
settings.path = settings.path || "";
settings.volume = settings.volume || 1;
settings.preload = settings.preload || false;
settings.allow_caching = settings.allow_caching || false;
settings.multiplay = settings.multiplay || false;
settings.loop = settings.loop || false;
settings.sprite = settings.sprite || null;
Expand Down Expand Up @@ -254,8 +255,11 @@
},

createUrl: function () {
var no_cache = new Date().valueOf();
this.url = this.options.path + encodeURIComponent(this.options.name) + "." + this.options.supported[this.ext] + "?" + no_cache;
this.url = this.options.path + encodeURIComponent(this.options.name) + "." + this.options.supported[this.ext];
if(!this.options.allow_caching) {
var no_cache = new Date().valueOf();
this.url += "?" + no_cache;
}
},

load: function () {
Expand Down Expand Up @@ -864,6 +868,7 @@
this.multiplay = options.multiplay;
this.volume = options.volume;
this.preload = options.preload;
this.allow_caching = options.allow_caching;
this.path = settings.path;
this.start = options.start || 0;
this.end = options.end || 0;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ion-sound",
"version": "3.0.7",
"version": "3.0.8",
"description": "JavaScript plugin for playing sounds and music in web",
"homepage": "http://ionden.com/a/plugins/ion.sound/en.html",
"author": {
Expand Down
10 changes: 8 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ JavaScript plugin for playing sounds on user actions and page events.

***

* Version: 3.0.7
* Version: 3.0.8
* <a href="http://ionden.com/a/plugins/ion.sound/en.html">Project page and demos</a>
* <a href="http://ionden.com/a/plugins/ion.sound/ion.sound-3.0.7.zip">Download ZIP</a>
* <a href="https://github.com/supernova-ws/ion.sound/archive/master.zip">Download ZIP</a>

## Description
* Ion.Sound — JavaScript-plugin for playing sounds based on Web Audio API.
Expand Down Expand Up @@ -135,6 +135,12 @@ ion.sound.play("my_cool_sound");
<td>boolean</td>
<td>Preloading sounds</td>
</tr>
<tr>
<td>allow_caching</td>
<td>false</td>
<td>boolean</td>
<td>Allow browser sounds caching by removing "?timestamp" from URL</td>
</tr>
<tr>
<td>multiplay</td>
<td>false</td>
Expand Down
10 changes: 8 additions & 2 deletions readme.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ JavaScript-плагин для воспроизведения звуков

***

* Версия: 3.0.7
* Версия: 3.0.8
* <a href="http://ionden.com/a/plugins/ion.sound/index.html">Сайт проекта и демо</a>
* <a href="http://ionden.com/a/plugins/ion.sound/ion.sound-3.0.7.zip">Скачать ZIP-архив</a>
* <a href="https://github.com/supernova-ws/ion.sound/archive/master.zip">Скачать ZIP-архив</a>

## Описание
* Ion.Sound — JavaScript-плагин для воспроизведения звуков, основанный на Web Audio API.
Expand Down Expand Up @@ -135,6 +135,12 @@ ion.sound.play("my_cool_sound");
<td>boolean</td>
<td>Предзагрузка звуков</td>
</tr>
<tr>
<td>allow_caching</td>
<td>false</td>
<td>boolean</td>
<td>Разрешает кэширование звуков браузером, убирая "?timestamp" из URL</td>
</tr>
<tr>
<td>multiplay</td>
<td>false</td>
Expand Down