Archive for the ‘IE’ category

How To : Simple Audio Streaming [Part-I]

March 26th, 2010

Starting the post with a well known verse “Your Songs Belong to Us”. Sounds funny but this is really true that you can’t hide your songs on the web. Your all songs that you put in your server, literally you also put on other computers . Because an advance user know how to download your songs/videos. You may use RTMP protocol or HTTP protocol for streaming and you may spend extra money to get a media server such as FMS, Wowza etc but it will hurt you that still you can’t save your songs from the web soldiers. What this RTMP connection does is, it can protect you from maximum users, because maximum general users will not get a direct link of download location of your songs. My question is, if I spend extra money , time and still can’t protect my songs from all users then what’s the point to spend extra money? Rather how about if we set it up such way so that I still can protect my songs that media server allows me to and I dont have to spend extra money and time?

Let’s say you have song albums, you don’t want let users to download your songs but listen to them and you want to pretend direct download from 95% users…i’m gonna discuss how we can do it. This part will describe the basic setup and how we can play a song on the web. So first part is going to be pretty simple but second part will be most interesting and important part.

No extra requirement needed! You have an apache server that will work. So let’s set it up….and well, we need a media player like JW Player. It’s free for no-commercial purpose. So we will use the free version for our example. Let’s download the free version and you have setup wizard to make your life easy. Once you have the player you can use the following example codes that has 2 tags for each song/playlist.

<script type='text/javascript' src='player/swfobject.js'></script>
<h3>I Need You</h3>
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='300' height='24' id='player1' name='player1'>
    <param name='movie' value='player.swf'>
    </param><param name='allowfullscreen' value='true'>
    </param><param name='allowscriptaccess' value='always'>
    </param><param name='playlistsize' value='180'>
    </param><param name='flashvars' value='player/player-viral.swf'>
    <embed id='player1'
           name='player1'
           src='player/player-viral.swf'
           width='300'
           height='24'
           allowscriptaccess='always'
           allowfullscreen='true'
           flashvars="file=playlist.xml&playlist=bottom&playlistsize=180"
           />
</param></object>

You may wonder why I have 2 tags and for the same playlist. Well, IE doesn’t understand embed tag and Firefox, Safari, Chrome don’t understand object tag. Funny eh…this is why, we have to keep the both tags to run them in all browsers. Ok, now let’s create the xml file that will work as our playlist. Here is a sample list xml file

<rss version="2.0" 
     xmlns:media="http://search.yahoo.com/mrss/"
     xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
    <channel>
        <title>Example media RSS playlist</title>
        <item>
            <title>MP3 Audio</title>
            <link>http://www.test.com/</link>
            <description>I miss you..</description>
            <media :content duration="44" />
            <media :credit role="author">Mr. X</media>
            <media :content url="you.mp3" />
            <media :thumbnail url="images/test.JPG" />
        </item>
 
        <item>
            <title>MP3 Audio</title>
            <link>http://www.test.com/</link>
            <description>Oye Oye..</description>
            <media :content duration="44" />
            <media :credit role="author">Mr. Y</media>
            <media :content url="you.mp3" />
            <media :thumbnail url="images/test.JPG" />
        </item>
        <item>
            <title>MP3 Audio</title>
            <link>http://www.test.com/</link>
            <description>I need you..</description>
            <media :content duration="44" />
            <media :credit role="author">Mr. X</media>
            <media :content url="test.mp3" />
            <media :thumbnail url="images/test.JPG" />
        </item>
    </channel>
</rss>

Now, simply just run the page where you placed your player code. And you will see something like the following screenshot.

 

Example Play List

Example Play List

  

Make sure you have songs in the same directory or the path you gave in the xml file. This is where we are done with basic setup songs list. But you see anybody can download it from xml list by finding the url. So we are left with main important part of this tutorial. Which I will do in the next part. Will discuss how we can make this list of songs secured so that most of the users face trouble to get it. Stay tune…

Dear Brac Bank Internet Service, You Suck!

December 6th, 2009

Really pissed off at Brac Bank internet banking service. I have been using it for last 1 year to see my transaction, debit, credit etc. Link that they gave me to log in, wasn’t even with a domain name. But anyways, that’s not my headache. I’m happy as long as I get the proper information that I registered for.

Few days back, I tried to log in to see my transaction and stuff and it said site is down or moved to a new address.

Site was moved in a new address

Site was moved in a new address

I tried it after 2 days again, but no information regarding the change. Shouldn’t have the informed me that they moved to a new location? Don’t I deserve it as their customer? So I sent an email to their IT dep and asked about it, they replied saying …

“….This requires a higher level of security for our systems and processes. Therefore, we are asking all previous I-banking subscribers to register once again to ensure that the new security standards are maintained.

after reading this, first thing came in my mind was like “WTF”, why the hell I have to register or fill up a form again? Don’t you already have my all information. I have never seen this kind of service before from any site!

But what could I do, I went to Brack Bank and registered for it again. And today they sent me a new link and log in information to use the internet banking service. I was happy yay! But hey, when I went to log in from the actual link it says “This site only supports Internet Explorer”! What?!? I don’t use IE and when I have to use I use it in VB XP. Do you think I should login to XP just to use your service dear BB?

Sorry i dont use IE for browsing...

Sorry i dont use IE for browsing...

I’m sorry, but this is complete bullshit. Don’t Firefox and Chrome have Anti-fishing capability? Or .NET framework (site is developed on .NET) always asks you to restrict users with IE?

I don’t know what option I should choose now. But Brac Bank should be careful about their customer serive. Till now it sucks!

Quick CSS Hack for IE 7/8

November 7th, 2009

As a developer you know how painful this IE shit is. If you are required to change a large amount of css classes just for IE 7/8 then it’s better to create a file with ie7.css or ie8.css and include the css file in your application. That will overwrite all classes for your IE 7/8 only and well don’t forget to keep “!important” to get the priority over existing properties. 

But, what if you just want to change only one or 2 properties just for IE? 
As an example let’s say you want to keep height of a DIV for IE8 in “auto” but for other browsers you want to keep it like height:10px; this is how we can do it…

.something {

    height:10px;  /* will work for rest of the browsers except IE8*/
    height /***/: auto9;   /* this will just change the IE8*/
 }

And what about IE7 ? just modifying the above class 
.something {
    height:10px;  /* will work for rest of the browsers except IE7*/
    *height: auto   /* this will just change the IE7*/
 }

Cool! i liked to get these hacks from online, certainly not a very good practice but hey, it’s not bad to use some hack instead of getting lost in nowhere? 

Get Adobe Flash playerPlugin by wpburn.com wordpress themes