tag:blogger.com,1999:blog-8134680341505762758.post529620945685945286..comments2023-05-28T04:03:19.674-04:00Comments on Russell Greenspan's Notes on Software Development: Microphone access in Silverlight via Flash and JavaScriptraulgspanhttp://www.blogger.com/profile/02350151469752304639noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-8134680341505762758.post-79213360245094842312010-03-09T08:28:41.067-05:002010-03-09T08:28:41.067-05:00Anonymous said... "What is the file format of...Anonymous said... <i>"What is the file format of the movie?"</i><br /><br />It's just a regular SWF file.raulgspanhttps://www.blogger.com/profile/02350151469752304639noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-37101057740179274112010-03-09T08:28:12.654-05:002010-03-09T08:28:12.654-05:00David said... "Not sure what dll or lib are r...David said... <i>"Not sure what dll or lib are required as a whole?"</i><br /><br />You just want a barebones Silverlight project. The bridge to Flash is via Javascript.raulgspanhttps://www.blogger.com/profile/02350151469752304639noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-55421741572369618542010-03-04T23:44:29.683-05:002010-03-04T23:44:29.683-05:00What is the file format of the movie?What is the file format of the movie?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-57519792531859989802010-02-03T05:16:13.029-05:002010-02-03T05:16:13.029-05:00Not sure what dll or lib are required as a whole?Not sure what dll or lib are required as a whole?Unknownhttps://www.blogger.com/profile/14408377563831672242noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-63820516911105100612010-02-02T21:17:14.280-05:002010-02-02T21:17:14.280-05:00No, sorry. Let me know if there's anything in ...No, sorry. Let me know if there's anything in particular that you're getting stuck on--raulgspanhttps://www.blogger.com/profile/02350151469752304639noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-58016506447449116252010-02-02T08:59:36.190-05:002010-02-02T08:59:36.190-05:00By any chance I can find a completed package to te...By any chance I can find a completed package to test it out? Tks.Unknownhttps://www.blogger.com/profile/14408377563831672242noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-17261339531074573322009-09-24T10:01:09.320-04:002009-09-24T10:01:09.320-04:00Sure, just use the attachVideo() method. I don'...Sure, just use the attachVideo() method. I don't recall the exact syntax, but the concept should work fine--raulgspanhttps://www.blogger.com/profile/02350151469752304639noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-4254447566427156102009-09-24T08:00:30.730-04:002009-09-24T08:00:30.730-04:00Good job! Can this solution be used for live video...Good job! Can this solution be used for live video conferencing? ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-56172413329836876252009-09-18T10:53:50.317-04:002009-09-18T10:53:50.317-04:00Nope, there's no way to record the audio strea...Nope, there's no way to record the audio stream locally. You have to publish it to FMS and record from there.raulgspanhttps://www.blogger.com/profile/02350151469752304639noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-55580263340361725262009-09-18T08:17:25.304-04:002009-09-18T08:17:25.304-04:00Thanks for the genuine solution. My Q. Is there a ...Thanks for the genuine solution. My Q. Is there a way to record the audio generated through the microphone without using Flash Media Server?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-64585339511542454552009-06-18T08:42:49.217-04:002009-06-18T08:42:49.217-04:00Ken Smith said...
“Just for what it's worth, a...Ken Smith said...<br /><i>“Just for what it's worth, although this technically works, I've spent a lot of time playing...”</i><br /><br />Yes, this Javascript bridge between Flash and Silverlight is definitely of the "hack solution" variety, and I agree that MSFT should have gotten these rich features to us sooner, but in any app (especially one in the browser) you're going to have issues to deal with. In general, if you support IE 6, 7, and 8, Firefox 2 and 3, and Safari 4, nicely designed html browser apps degrade to CSS hack after hack in the most non-straightforward imaginable. At least you know your Silverlight app will run the same everywhere...<br /><br />Regarding the overlay issue: I think you'll find that the Flash movie staying on top of a ChildWindow is really a limitation of certain browsers. Just make a simple html page with a flash movie and try to show a spotlight <div> on top of it. You'll see that some browsers are fine with this and others (not naming names, but if I remember correctly MSFT is in the wrong here) exhibit the behavior you describe where the movie stays on top of the spotlight. You'll just have to employ a relatively simple "hide Flash movie before showing spotlight" technique. Just don't actually "hide" the movie, since Firefox will reload it when you re-show it :); set its size to 1,1 or its position off-screen or some other such thing--raulgspanhttps://www.blogger.com/profile/02350151469752304639noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-82993524826579550652009-06-18T08:24:30.087-04:002009-06-18T08:24:30.087-04:00Anonymous said...
“Do you happen to know how I can...Anonymous said...<br /><i rel="cquote">“Do you happen to know how I can store the recorded data locally? In a memorystream or some sort of buffer? Then I guess it could be base64 encoced and passed to Silverlight..”</i><br /><br />Unfortunately, there's really no way to save the data locally. You have to run FMS or its equivalent and attach the microphone to a publish NetStream--raulgspanhttps://www.blogger.com/profile/02350151469752304639noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-79641202922255258832009-06-18T04:03:55.177-04:002009-06-18T04:03:55.177-04:00Just for what it's worth, although this techni...Just for what it's worth, although this technically works, I've spent a lot of time playing with this approach, and it leaves a lot to be desired. There's a lot more to managing a camera and a microphone in a production application than simply showing it and hoping that it works. You've got error handling, repositioning, and all sorts of other issues that you have to deal with, and none of them are straightforward when you have to go through two levels of indirection to get there.<br /><br />To take one example: when you show a ChildWindow in Silverlight 3, the flash video window is positioned on top of the ChildWindow. Not the sort of experience you'd generally want to offer your users.<br /><br />The more I work with this particular solution, the more annoyed I am that MS -- despite acknowledging that webcam support is the most requested feature -- decided not to put it into SL 3.0, and will apparently be delaying it until SL 4.0. Damn MS...Ken Smithhttps://www.blogger.com/profile/09031647503349727336noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-29130903822823172002009-06-13T03:25:34.428-04:002009-06-13T03:25:34.428-04:00Do you happen to know how I can store the recorde...Do you happen to know how I can store the recorded data locally? In a memorystream or some sort of buffer? Then I guess it could be base64 encoced and passed to Silverlight..Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-30456753241316074042009-05-14T13:57:00.000-04:002009-05-14T13:57:00.000-04:00sure, the FMS part is very straightforward. when y...sure, the FMS part is very straightforward. when your movie loads, you just need to connect:<br /><br />nc = new NetConnection();<br />nc.connect(FMS_URI);<br /><br />set up a receiver:<br /><br />//create stream<br />ns_r = new NetStream(nc); <br /><br />//create clip and attach stream<br />this.createEmptyMovieClip("sound_mc_r", this.getNextHighestDepth()); sound_mc_r.attachAudio(ns_r);<br /><br />//play stream<br />ns_r.play(STRING_IDENTIFIER);<br /><br />and then setup a publisher:<br /><br />ns = new NetStream(nc);<br />ns.publish(STRING_IDENTIFIER, "record");<br />ns.attachAudio(Microphone.get());<br /><br />it's really that simple--raulgspanhttps://www.blogger.com/profile/02350151469752304639noreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-73168360430471533522009-04-18T23:23:00.000-04:002009-04-18T23:23:00.000-04:00can you post FMS part of it, so that we can learn ...can you post FMS part of it, so that we can learn how to use it.<br /><br />FMS is crucial part of this because FMS is what it required to record and store voice.<br /><br />orangejim@gmail.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8134680341505762758.post-1921155032711795342009-02-04T08:41:00.000-05:002009-02-04T08:41:00.000-05:00...and this post is pure gold. Thanks a lot....and this post is pure gold. Thanks a lot.Anonymousnoreply@blogger.com