Added the flag "force_html5_audio" for howler
Added a compilation flag `force_html5_audio` to force howler to always use html5 audio. I don't think anyone will find this useful but it shouldn't do any harm to have.
This commit is contained in:
committed by
Joshua Granick
parent
28e1056885
commit
1d2abf7d2e
@@ -151,7 +151,13 @@ class AudioBuffer
|
|||||||
|
|
||||||
#if (js && html5 && lime_howlerjs)
|
#if (js && html5 && lime_howlerjs)
|
||||||
var audioBuffer = new AudioBuffer();
|
var audioBuffer = new AudioBuffer();
|
||||||
|
|
||||||
|
#if force_html5_audio
|
||||||
|
audioBuffer.__srcHowl = new Howl({src: [path], html5: true, preload: false});
|
||||||
|
#else
|
||||||
audioBuffer.__srcHowl = new Howl({src: [path], preload: false});
|
audioBuffer.__srcHowl = new Howl({src: [path], preload: false});
|
||||||
|
#end
|
||||||
|
|
||||||
return audioBuffer;
|
return audioBuffer;
|
||||||
#elseif flash
|
#elseif flash
|
||||||
switch (Path.extension(path))
|
switch (Path.extension(path))
|
||||||
@@ -194,7 +200,13 @@ class AudioBuffer
|
|||||||
{
|
{
|
||||||
#if (js && html5 && lime_howlerjs)
|
#if (js && html5 && lime_howlerjs)
|
||||||
var audioBuffer = new AudioBuffer();
|
var audioBuffer = new AudioBuffer();
|
||||||
|
|
||||||
|
#if force_html5_audio
|
||||||
|
audioBuffer.__srcHowl = new Howl({src: paths, html5: true, preload: false});
|
||||||
|
#else
|
||||||
audioBuffer.__srcHowl = new Howl({src: paths, preload: false});
|
audioBuffer.__srcHowl = new Howl({src: paths, preload: false});
|
||||||
|
#end
|
||||||
|
|
||||||
return audioBuffer;
|
return audioBuffer;
|
||||||
#else
|
#else
|
||||||
var buffer = null;
|
var buffer = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user