At the Digigirlz event, the attending girls recorded various movies with mobile-phones and uploaded all videos to Silverlight Streaming (SLS). Initially I had planned to set up a Silverlight 2 application to access the videos. My application would have support for a service to access our SLS account through the SLS SDK and then all files in our SLS account would be bound to a listbox. A video selected from the box would be dynamically bound to a MediaElement. I could do the same in ASP.NET; however the plan was to experiment with Silverlight 2 user controls, the SLS API and templates. The application could also be included in my “Silverlight Experiments“ page – what a genius thought!
Having the idea + the plan; the actual application development would be soooo simple… Definitely this assumption should be crowned with a – LOL! My experimental application turned out to be a source of confusion.
Based on my initial plan, the first step was to connect to the SLS account by using the SLS SDK. The SLS SDK supports several functions such as accessing a single media file, retrieving a file-list etc. In either case, if you connect to your SLS account through the SLS SDK you may retrieve a URL/service endpoint such as(streaming:/account_ID/fileSet/fileName). After some reading + coding, I found out that there was no easy method to access SLS from my application because the SLS service does not support cross domain calls from Silverlight. Yeah – I must admit; I first did some coding then reading; what else is there to say? This tech-adventurous soul of mine, just whispers all the time, the following made-up rhyme: “You have work to be done: Manuals are number one, yet coding struggles are much more fun“!
Eventually I solved the cross domain file issue with an inconvenient workaround and accessed our digigirlz SLS file-set. With the file-set, it became possible to dynamically create an iframe and play the selected video from the SLS account. Conclusively I could move to my next brilliant idea, which was to get rid of the iframe method and play the video in a customized MediaElement so that the entire application would be in Silverlight. Voila – another challenge!
Too soon had I to discover that there is no way to directly/dynamically set a SLS file’s URL to the MediaElement, because SLS doesn’t provide an http endpoint to a media file hosted in the service. Searching through the Silverlight.net forums, I found out that it’s possible to reference a SLS file/fileset through initParameters. Up to now, none of the various initParameters sample codes did work and my application could not access the video fileset/file. These are some of the forum entries I read through several times:
After having my share of “trial and error”, I decided to silence the tech-adventurer as there is some freelance, yet real and serious, work I need to do! But besides my inner silence, I myself (how many are we?) was still sneaking around my favorite Silverlight blogs, naively(!) hoping to come across something like “CIGDEM – Error in LINE XYZ: Correct bla bla bla” in those blog entries. Needles to say; I had to read between the lines until I could make my next move. On Tim Heuer’s blog I had read some details about SLS and decided to write about my SLS problem issues. After a few e-mails, I have a brand new info-resource with a SLS sample that I can try out (ok – first read than try out!). Here’s what I am going to read: http://www.slickthought.net/post/Cracking-the-Silverlight-Streaming-Direct-Content-Access-Code.aspx
So surely the adventurer is back and once again full of fresh hope! If I should be able to fix my (wounded) Silverl(n)ight(mare) application, I am going to display the application in my “Silverlight Experiments” page… Since last week I am also trying to get some hands-on-experience in Grails, whenever the adventurer is not lost in Silverlight-Land. Grails is an open-source web application framework that leverages the Groovy language and complements Java Web development. Recently I am busy with scanning through quick-start documents, downloading new Eclipse plug-ins, changing local environment settings, etc… Numerous tiny details that you’d better not skip, if you don’t want to end up in a Java mishmash! Probably it’s not an overstatement if I say: “Open-source needs an open-mind” and maybe quite a good portion of optimism along the way!
In contrast to Silverlight and Grails, which are still pretty new to me; I’m doing something for the 2.time: I’m reading “Sophie’s World” by Jostein Gaarder once again. While I was in high-school I read the book in German; now I’m reading the English copy. My only wish is to remind myself that “The world should not become a habit for me; that I should never take it for granted.” I don’t want to lose my ability to wonder about the world; I want to protect the right dose of childish astonishment within me… If I should now go back to my “How many are we?” question; I would just say – one more with – The curious philosopher! By the way; if you haven’t read “Sophie’s World” – give it a try!
Even an inquiring mind needs some rest + nice dreams! Meanwhile the other cast members shall be freezed in hibernate state. (Hey!-freeze I said!)
THE END. At least for tonight;)