Comments (4)
Yeah that looks right to me. You're saying there was no error. I know it sounds silly, but I'm assuming you made sure your system volume was up... ;-) Did you try putting the player.play()
call in the try_audio
function itself? That shouldn't make a difference as long as you did things in the right order (first select the file, then play from console). You made sure that the try_audio
function was called at all (console.log
or something)? Just trying to rule out possibilities. :)
from aurora.js.
Hi Devon. Thanks for the answer.
Yeah, the volume is fine. Same firefox plays justs fine the same file with another script implementing jsmad.
Btw, my first guess was also the same as yours: volume. So i checked on the system, and in the volume property of the player, and both where 100%.
The function was called ok, as otherwise there's no "window.player" declared (note the lowercase P). "player.play()" returns "undefined" and nothing happens. The player's internal property "playing" also changes as a result of the play call.
As i said, i tried a bunch of other setups in order to handle the file and passing it to the player. Some of them did throw errors on the console, regarding XHR and local access. But this simple and basic setup, using a file input and the "fromFile" constructor, throws nothing at all.
It's interesting to note that i have also no network transfer log on the "net" tab on firebug, so i'm betting on some asset loading problem.
I checked this on Chrome's developer console (where, again, there's no errors) and its network log shows some activity initiated from aurora.js and loading from a Blob URL. However, it's just 49K and i'm trying to load a 4MB mp3 file.
Here's the Chrome network log:
{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.17"
},
"pages": [
{
"startedDateTime": "2013-02-09T23:29:57.302Z",
"id": "page_2",
"title": "http://localhost/trabajo/desgrabados/experimentos/aurora.js/test2.php",
"pageTimings": {
"onContentLoad": 60,
"onLoad": 61
}
}
],
"entries": [
{
"startedDateTime": "2013-02-09T23:29:57.302Z",
"time": 2,
"request": {
"method": "GET",
"url": "http://localhost/trabajo/desgrabados/experimentos/aurora.js/test2.php",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Accept-Charset",
"value": "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
},
{
"name": "Accept-Encoding",
"value": "gzip,deflate,sdch"
},
{
"name": "Host",
"value": "localhost"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.8"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17"
},
{
"name": "Accept",
"value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
},
{
"name": "Cache-Control",
"value": "no-cache"
},
{
"name": "Connection",
"value": "keep-alive"
}
],
"queryString": [],
"cookies": [],
"headersSize": 462,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Date",
"value": "Sat, 09 Feb 2013 23:29:57 GMT"
},
{
"name": "Content-Encoding",
"value": "gzip"
},
{
"name": "Server",
"value": "Apache/2.2.22 (Ubuntu)"
},
{
"name": "X-Powered-By",
"value": "PHP/5.3.10-1ubuntu3.5"
},
{
"name": "Vary",
"value": "Accept-Encoding"
},
{
"name": "Content-Type",
"value": "text/html"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
},
{
"name": "Connection",
"value": "Keep-Alive"
},
{
"name": "Keep-Alive",
"value": "timeout=5, max=95"
},
{
"name": "Content-Length",
"value": "249"
}
],
"cookies": [],
"content": {
"size": 430,
"mimeType": "text/html",
"compression": 181
},
"redirectURL": "",
"headersSize": 305,
"bodySize": 249
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 1,
"receive": 0,
"ssl": -1
},
"pageref": "page_2"
},
{
"startedDateTime": "2013-02-09T23:29:57.307Z",
"time": 7,
"request": {
"method": "GET",
"url": "http://localhost/trabajo/desgrabados/repo/alfa1/js/00-jquery-1.7.min.js",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Accept-Charset",
"value": "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
},
{
"name": "Accept-Encoding",
"value": "gzip,deflate,sdch"
},
{
"name": "Host",
"value": "localhost"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.8"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17"
},
{
"name": "Accept",
"value": "*/*"
},
{
"name": "Referer",
"value": "http://localhost/trabajo/desgrabados/experimentos/aurora.js/test2.php"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Cache-Control",
"value": "no-cache"
}
],
"queryString": [],
"cookies": [],
"headersSize": 484,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Date",
"value": "Sat, 09 Feb 2013 23:29:57 GMT"
},
{
"name": "Content-Encoding",
"value": "gzip"
},
{
"name": "Last-Modified",
"value": "Thu, 24 Jan 2013 23:04:37 GMT"
},
{
"name": "Server",
"value": "Apache/2.2.22 (Ubuntu)"
},
{
"name": "ETag",
"value": "\"62c571-16f44-4d410d5b7cb40\""
},
{
"name": "Vary",
"value": "Accept-Encoding"
},
{
"name": "Content-Type",
"value": "application/javascript"
},
{
"name": "Connection",
"value": "Keep-Alive"
},
{
"name": "Accept-Ranges",
"value": "bytes"
},
{
"name": "Keep-Alive",
"value": "timeout=5, max=94"
},
{
"name": "Content-Length",
"value": "33274"
}
],
"cookies": [],
"content": {
"size": 94020,
"mimeType": "application/javascript",
"compression": 60746
},
"redirectURL": "",
"headersSize": 355,
"bodySize": 33274
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 5,
"receive": 1,
"ssl": -1
},
"pageref": "page_2"
},
{
"startedDateTime": "2013-02-09T23:29:57.308Z",
"time": 5,
"request": {
"method": "GET",
"url": "http://localhost/trabajo/desgrabados/experimentos/aurora.js/repo/aurora.js",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Accept-Charset",
"value": "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
},
{
"name": "Accept-Encoding",
"value": "gzip,deflate,sdch"
},
{
"name": "Host",
"value": "localhost"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.8"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17"
},
{
"name": "Accept",
"value": "*/*"
},
{
"name": "Referer",
"value": "http://localhost/trabajo/desgrabados/experimentos/aurora.js/test2.php"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Cache-Control",
"value": "no-cache"
}
],
"queryString": [],
"cookies": [],
"headersSize": 487,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Date",
"value": "Sat, 09 Feb 2013 23:29:57 GMT"
},
{
"name": "Content-Encoding",
"value": "gzip"
},
{
"name": "Last-Modified",
"value": "Sat, 09 Feb 2013 20:36:32 GMT"
},
{
"name": "Server",
"value": "Apache/2.2.22 (Ubuntu)"
},
{
"name": "ETag",
"value": "\"4ba122-14e31-4d550a1977400\""
},
{
"name": "Vary",
"value": "Accept-Encoding"
},
{
"name": "Content-Type",
"value": "application/javascript"
},
{
"name": "Connection",
"value": "Keep-Alive"
},
{
"name": "Accept-Ranges",
"value": "bytes"
},
{
"name": "Keep-Alive",
"value": "timeout=5, max=100"
},
{
"name": "Content-Length",
"value": "15738"
}
],
"cookies": [],
"content": {
"size": 85553,
"mimeType": "application/javascript",
"compression": 69815
},
"redirectURL": "",
"headersSize": 356,
"bodySize": 15738
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": 0,
"send": 0,
"wait": 3,
"receive": 1,
"ssl": -1
},
"pageref": "page_2"
},
{
"startedDateTime": "2013-02-09T23:30:02.538Z",
"time": 5,
"request": {
"method": "GET",
"url": "blob:http%3A//localhost/3ddb3c4f-c2b3-48b2-8405-6a8155de855e",
"httpVersion": "HTTP/1.1",
"headers": [],
"queryString": [],
"cookies": [],
"headersSize": 75,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [],
"cookies": [],
"content": {
"size": 1048576,
"mimeType": "text/plain"
},
"redirectURL": "",
"headersSize": 17,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": -1,
"wait": -1,
"receive": 3,
"ssl": -1
},
"pageref": "page_2"
},
{
"startedDateTime": "2013-02-09T23:30:02.547Z",
"time": 3,
"request": {
"method": "GET",
"url": "blob:http%3A//localhost/4cede754-3795-43bd-b568-cf22cfb4328d",
"httpVersion": "HTTP/1.1",
"headers": [],
"queryString": [],
"cookies": [],
"headersSize": 75,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [],
"cookies": [],
"content": {
"size": 1048576,
"mimeType": "text/plain"
},
"redirectURL": "",
"headersSize": 17,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": -1,
"wait": -1,
"receive": 3,
"ssl": -1
},
"pageref": "page_2"
},
{
"startedDateTime": "2013-02-09T23:30:02.554Z",
"time": 4,
"request": {
"method": "GET",
"url": "blob:http%3A//localhost/223c10b8-222c-43b3-8321-25911671c7ca",
"httpVersion": "HTTP/1.1",
"headers": [],
"queryString": [],
"cookies": [],
"headersSize": 75,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [],
"cookies": [],
"content": {
"size": 1048576,
"mimeType": "text/plain"
},
"redirectURL": "",
"headersSize": 17,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": -1,
"wait": -1,
"receive": 3,
"ssl": -1
},
"pageref": "page_2"
},
{
"startedDateTime": "2013-02-09T23:30:02.560Z",
"time": 3,
"request": {
"method": "GET",
"url": "blob:http%3A//localhost/64636b61-2d6c-4777-a5e5-d2445b840c92",
"httpVersion": "HTTP/1.1",
"headers": [],
"queryString": [],
"cookies": [],
"headersSize": 75,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [],
"cookies": [],
"content": {
"size": 1048576,
"mimeType": "text/plain"
},
"redirectURL": "",
"headersSize": 17,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": -1,
"wait": -1,
"receive": 2,
"ssl": -1
},
"pageref": "page_2"
},
{
"startedDateTime": "2013-02-09T23:30:02.565Z",
"time": 2,
"request": {
"method": "GET",
"url": "blob:http%3A//localhost/2549c69d-d9c4-4005-ae0d-38674df7b393",
"httpVersion": "HTTP/1.1",
"headers": [],
"queryString": [],
"cookies": [],
"headersSize": 75,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [],
"cookies": [],
"content": {
"size": 791790,
"mimeType": "text/plain"
},
"redirectURL": "",
"headersSize": 17,
"bodySize": 0
},
"cache": {},
"timings": {
"blocked": 0,
"dns": -1,
"connect": -1,
"send": -1,
"wait": -1,
"receive": 1,
"ssl": -1
},
"pageref": "page_2"
}
]
}
}
Any clue?
I don't even know what to test here :(
from aurora.js.
Well, after some time i finally managed to make it work :)
The thing was, i was testing aurora without the mp3 decoder. Once i downloaded the decoder, the sample code in this issue worked as intended.
I'd like to leave two notes here, about my experience with this task:
In the examples, you call for an "import" utility in order to build aurora.js. An utility that comes from npm. However, "import" is a very common name for an utility/program/script, and i already had another package on my box (i'm on ubuntu 12.04) that included an "import" utility (the "imagemagik" package, i think). And as both scripts had different paths (one was in "/usr/bin" and the other one in "/usr/lib/bin", or something like that), there was no error at all after the packages installation. Then, trying to compile the decoder returned weird errors, that nothing had to do with Aurora nor the decoder.
Perhaps it could be a good idea to warn other users reading the docs about this? I figured it out using "whereis import", and trying ANOTHER "import", not the default one.
There should be some error or warning message regarding the absence of a decoder. As stated in this issue, i got no error from Aurora when i give it an mp3 file and there's no decoder. That was a pain to figure out being a novice.
Once i understood the way Aurora is intended to be used (as a framework, extending it), it became extremely easy to use and worked like a charm. Thanks for this great work,
Daniel.
from aurora.js.
Thanks for the feedback. I actually did rename import to importer (http://github.com/devongovett/importer) a while back for exactly those reasons. I probably forgot to update the documentation here, so sorry about that.
There should be an error message about the lack of decoder already as well but it is possible that Aurora thought the files you were giving it were in a format it thought it could play. I'm not sure what happened there, but I'll look into it more.
Thanks again and good luck!
Devon
from aurora.js.
Related Issues (20)
- How do I decode to raw, resample to 44,1khz and split stereo into dual mono buffers?
- "Something is wrong in HTTPSource.loop" while using AV.Asset.fromURL(remoteUrl)
- [Solved]switch backend from Speaker to PortAudio(naudiodon)
- Aurora not playing certain flac files with no error
- Live decoding on Android
- Node example HOT 1
- No default jsDelivr CDN file set
- Problems with 24-bit WAV files
- Questions about memory manage.
- Is decoding a specific part of a gargantuan file supported efficiently? HOT 3
- HTTP requests still sending to server even if HTTP error is returned
- Unit tests fail on master branch
- Chrome browser change for same site cookies
- gyp build fail HOT 1
- build for browser
- m4a demuxer fails when processing a file with co64 atom
- Window Not Defined
- decode fail
- How to install additional codecs? HOT 1
- Uncaught SyntaxError: Unexpected identifier 'key'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aurora.js.