Recent activity
Subscribe to this feed
bum51 replied on June 12, 2009 22:34 to the question "Can I protect my audio files whilst using SoundManager?" in Schillmania!:
bum51 replied on June 12, 2009 20:52 to the problem "Sound position attribute not updating, while events not firing." in Schillmania!:
Yeah, I've actually stripped the code down to using console.log for debugging rather than my regular event handlers, so I doubt it's that. I would agree with you that it didn't recognize the playstate, except that I wouldn't think that the whileloading event depends on that and it's got the same issue.
It IS however possible that it's happening when the file is played more than once in a single session, as I reuse the sound objects if they need to be accessed more than once (but I unload them after each time they completely play through).
I haven't found any consistent way of watching for that error, it's actually happened on one of the first 5 sounds (none of which were the same) in one session when I was testing. As I've said, it's very intermittent.
And yes, I'm using Flash 9. The SM debug info seems to be exactly the same as it would normally be. I've also been using debugging flash in one of my environments and it doesn't seem to throw any errors either. I'm fresh out of ideas on this one which is why I'm posting, because I haven't seen anything go wrong with SM in quite a while but I can't find anything that would cause it in my own code :(
bum51 replied on June 12, 2009 20:37 to the question "Can I protect my audio files whilst using SoundManager?" in Schillmania!:
Here's what I've done to secure my website:
1) in your database have a "logged-on" users table, with a special (session specific) key for each one.
2) when logging in, assign a key, then save it to the table with a timestamp
3) pass the key with the url as a GET parameter.
4) update the timestamp when accessed and still logged in
this way:
-after a certain amount of time you can delete (or ignore) the old logged in records so that no one can get real urls without having logged in
-if you have session issues (php seems to crap out if you try to use regular session variables) then the users can still access their songs
-you can "hide" all of the sounds through a non-http accessible folder, then stream using whatever language you're using
the only thing here is that you have to make absolute certain that you provide the keys when accessing the sounds.
It's still impossible to hide it completely, but at least it would force people to have an account and log in.
bum51 replied on June 10, 2009 17:18 to the question "Calling SM2 from 2nd Javascript function" in Schillmania!:
bum51 reported a problem in Schillmania! on June 10, 2009 16:55:
Sound position attribute not updating, while events not firing.Occasionally I get this weird error where the whileplaying and whileloading events don't fire. I've also noticed that the position doesn't get updated on the songs. It's a very intermittent issue, but I've been using the defaultOptions object to create every one of the event handlers.
As far as I can tell, something must go wrong when creating the sound on the flash end and the events either just don't fire (possibly thinks it's a multishot? [which btw I have disabled]), or they don't get registered onto the sounds.
Everything else seems to work fine, like pausing and even the onload/onfinish events, so my best thought is the fake multishot option on this one.....
Fortunately it doesn't even happen very often most of the time, sometimes days will go by where I don't notice it at all even, so I wouldn't call this a priority issue, but it's certainly an interesting one.
A comment on the question "Calling SM2 from 2nd Javascript function" in Schillmania!:
haha, woops! – bum51, on May 28, 2009 23:01
bum51 replied on May 28, 2009 14:06 to the question "Calling SM2 from 2nd Javascript function" in Schillmania!:
It's possible that the cookie script is being called before SoundManager is loaded and therefore has not created the sound before the cookie script tries to call it.
Here is a script for cookies that I came up with some time ago that may help:
var C=Cookies= {
started:false,
values:{},
path:"\/",
create:function (name,value,days,path) {
if (days){
var date= new Date();
date.setTime(date.getTime()+((days||365)*24*60*60*1000));
var expires = date.toGMTString();
}
document.cookie = name+"="+escape (value )+(!days? "" : "; expires="+expires)+";path="+(path||this.path);
this.values[name]=value;
},
modify:function (name,value,days,path) {
this.create (name,value,days,path);
},
init:function () {
this.path = location.pathname.substr(0,location.pathname.lastIndexOf("\/")+1);
var allCookies = document.cookie.split ('; ');
for (var i=0;i<allCookies.length;i++) {
var cookiesPair = allCookies[i].split('=');
this.values[cookiesPair[0]] = unescape(cookiesPair[1]);
}
this.started=true;
},
read:function (name) {
return this.values[name];
},
erase:function (name) {
this.create(name,"",-1);
this.values[name]=null;
}
}
Cookies.init()
Usage:
Cookies.create("mycookie","cookievalue"); //session only
var value = Cookies.read("mycookie");
OR
Cookies.create("mycookie","cookievalue", numberofdays); //set number of days
To use it for your website I would suggest something like this:
soundManager.url = 'audio/';
soundManager.debugMode = false;
soundManager.onload = function() {
var mySound = soundManager.createSound({
id: 'sound',
url: 'audio/eagle.feather.mp3',
volume: 80,
autoPlay: false
});
if (Cookies.read("myTestCookie")!="true"){
mySound.play();
}else{
Cookies.create("myTestCookie","true");
}
}
This way you can tell the sound to play AFTER it's been created.
Cheers,
bum51
bum51 replied on May 23, 2009 18:16 to the problem "durationEstimate stays undefined" in Schillmania!:
bum51 reported a problem in Schillmania! on May 22, 2009 18:42:
durationEstimate stays undefinedI can verify that the "bytesTotal" and the "bytesLoaded" values work as my loading bar works, but the progress bar broke. After some testing I found that the durationEstimate never seems to be given a value. Not really a problem, as I can just reference duration instead when that happens, just a bit weird is all.
My workaround.....
instead of :
(this.loaded?this.duration:this.durationEstimate)
Use:
(this.loaded?this.duration:this.durationEstimate||this.duration)
A comment on the problem "Video loads, i get sound but theres no picture" in Schillmania!:
Also also: even telling it to stop() when it is playing still leaves it playing because the JS thinks that it already IS stopped, so a way to get around that is to fire both play() and stop() events on the video. – bum51, on May 20, 2009 21:43
A comment on the problem "Video loads, i get sound but theres no picture" in Schillmania!:
Also, often even when autoPlay is explicitly set to false, it'll play anyway. – bum51, on May 20, 2009 21:36
bum51 replied on May 20, 2009 21:34 to the problem "Video loads, i get sound but theres no picture" in Schillmania!:
A comment on the problem "Not working in chrome?" in Schillmania!:
Actually the funny thing is that wasn't calling anything to do with soundmanger within that particular load function (just setting up a bunch of other things independent of soundmanager), they just seemed to interfere with eachother anyway..... Still, not a problem I don't think, but good to know in case anyone else has the same issue. – bum51, on May 11, 2009 07:21
A comment on the problem "Not working in chrome?" in Schillmania!:
or ya know, another solution would be soundmanager.onload function....
and it does seem that the original issue with chrome was a cacheing one sadly, as I haven't been able to reproduce it since. – bum51, on May 10, 2009 18:44
bum51 replied on May 10, 2009 18:41 to the problem "Not working in chrome?" in Schillmania!:
After performing more tests on several other computers, it seems that it wasn't a chrome specific issue. I had been gradually converting some of my code to use jQuery to make things a bit more simple to implement new features and such, and it SEEMS that there's an incompatibility there instead.
if you use the
$(function)
command (run on document ready) then it seems as though it may either run before soundmanger loads or as it is loading, meaning that it interferes when things aren't completely loaded and I'm trying to call them.
Solution:
<body onload="load(event)" ....>
bum51 replied on May 06, 2009 15:19 to the problem "Not working in chrome?" in Schillmania!:
bum51 replied on May 05, 2009 05:13 to the problem "Not working in chrome?" in Schillmania!:
Hmmm, I might look into the debug version of flash, but hopefully I won't have to for now.
I started getting the errors again, so I'm a little less mad at myself, because now I know it's not JUST the cache at least ;-)
It seems to go away if I close the tab and open it in a new one.
I'm thinking that it might be something wrong with the javascript debugger and console in chrome though as it seems like it somehow breaks things. I've been using the "dev" channel for chrome BTW.
bum51 replied on May 04, 2009 00:22 to the problem "Not working in chrome?" in Schillmania!:
bum51 replied on May 04, 2009 00:20 to the problem "Not working in chrome?" in Schillmania!:
bum51 reported a problem in Schillmania! on May 04, 2009 00:15:
Not working in chrome?For some strange reason the update seems to have broken Chrome... Not any other browser, but there seems to be a flash error that it runs into in chrome. No idea what the error actually is, but I took a picture of the console hoping that might help.
http://ytdj.ca/error.jpg
Also: some properties that I have set that I thought might be relevant to the issue
soundManager.flashVersion = 9;
soundManager.defaultOptions.multiShot=false;
soundManager.defaultOptions.useWaveformData=true;
soundManager.defaultOptions.useEQData=true;
soundManager.defaultOptions.useHighPerformance=true;
soundManager.defaultOptions.autoLoad=true;
I tried disabling waveform, eq and high performance and a bunch of other things, but I just can't seem to fix this one.....
| next » « previous |
Loading Profile...


