Saturday, March 17, 2012

An Apple in a Developers Day

There is an increase in rage on internet around the articles on "Flash not working on IOS" Steve Jobs in 2010 has clearly indicated that ios devices are not going to support Flash and is going with open standards like HTML5 and css3 and javascript for multimedia content on Web.

At the same times you can read a number of articles saying "Flash is Dead", articles from ios users complaining  "They can't see some sites properly because of no support from Flash" and articles from Flash developers that HTML5 can never compete with flash.

In the middle of it all one day a developer completely unaware of the the political or technical reasons behind this is given a task to support videos playing on his intranet on ios devices as well.

Developer Story

Day 1 (The Excitement):
Oh Well I will learn to support videos on idevices.                        
Awesome man awesome it will be so much fun.



Day 2 (Moment of Realization 1):
Lets see why videos are not playing on ipad.
Though on my windows machine they play in all browsers.  
It should be matter of minutes.
Lets search around it.


errr "Steve BABA" says
"Flash is not supported on iDevices" "HTML5 is the new Game"
My goodness but all my video files are .flv. What to do know?
There must be a workaround, Flash should be supported in some way?
I have been playing Flash Games since Childhood.
I will search the whole web and find out something.


Day 3 (Moment of Realization 2):
There is no workaround. I need to use html5 video Tag, So will video tag play .flv files? Not Sure lets try. Try but where Man I don't have an IPAD to try? Ah- Non issue there should be simulator lets just try it there.


 Day 4 (Understanding H.264 ):
  No Results. Now what...
Oh Dont Worry i am the ninja.
i think i need to convert these .flv files.
lets search some more. What format they need to be converted into?
Oh thats H.264.


Day 5-6-7 (Alien "FFMPEG" enters):
let me figure out how i will convert the files through ffmpeg the supported exe in my system which converts uploaded videos to .flv format.What the heck i am stuck understanding ffmpeg, There is no proper documentation available and i am not very sure what i am searching for. Somebody rescue me.


Day 8-9-10 (Superman Returns) .
 I am the son of Almighty. I am like superman i found the command line of ffmpeg for converting the video files into h264 format. I will create a script to convert existing files into this format. Will modify upload logic to convert uploaded videos to have h264 format.


Day 11 (It works It works).
I have figured out everything.
Lets just remove the hardcoding and replace it with the php script..
Yes it works it works.


Day 12 (The RTMP Mess)
Hey whats this RTMP thing.
Some of the my media url's are having RTMP protocol why isnt it working.
Let me post this on Stackoverflow, There will be an answer soon.
Refresh Refresh Refresh After two hours the answer "RTMP not supported with video tag" Now what ? Should i search more ? Will read the file from the Server and output it in a php file, looks like there is no other option.


Day 13 (The Browsers Mess) Ok it works on IPAD simulator, It works on Safari too. But chrome, mozilla and IE7 are having some issues. I think i would go with the old way in Desktop browsers and do it just for ios. Will figure the issues later. Let me just fix this.



Day 14 (Moving to Staging Server)
Now when its all working fine locally. Let me move it to staging server and then test it on a real ipad from a friend.

Day 15 (Death is a Truth)
How can something go smooth in a Developers life.On Staging server on a real ipad. Its not working, Now what it could be how long will i keep searching and what should i search now? I am short of keywords. What is it? What is it?
Am i the most useless creature on this planet.
What is the purpose of life? 
Should i stop eating chicken? 
Are they sending there curse from heavens above? 
Bullshit, Oh man i miss KFC.

Day 15(In the night) I must not loose senses, it happens all time, i am the likes of Einsten, I belong to the land of Ganga. I will do it for sure.

Day 16 (Tried on Another ipad)
Lets see it on another ipad. Oh wait there is an error message that i earlier ignored. It has something to do with SSL Certificate. Looks like its because on staging we are using a self signed certificate and that can be an issue.

Day 17-21 (Installing The Certificate and Various things)
Try installing the certificate on friends device and various things dont know what i am doing but just want it to play on one ipad first, thats the only thing i want to do in this life and then i will go to Himalayas.



Day 22 (It works again):
So all browsers on Windows, IPad simulator and real ipad all are fine. But i can smell it. How can it leave me so early. (My Evil Karma) Shut up Man your done send it across for testing (The Good Karma).

Day 23 (It works on my System) 
I knew it, Its still there.How can it go so soon.Client Saysa it not working.Well What it is now? Forget it? Lets read some random articles "How to die in 100 ways" "How to Control your anger" "100 worst Jobs".

Day 24 - 32 (End of Story)
ios 4 is different from ios 5. Need to try different things , Developers life is Hell, It works on Production, Everything is fine, client Verifies it. I can think about life again.

Day 33 ( A new Beginning)
New Task Arrived : Media player is not correctly displaying play back bar. There is no marker for position (time), and the times are not showing (total time or time elapsed).




4 comments:

  1. Convert using Adobe Media Encoder, then use tag. Not hard.

    ReplyDelete
    Replies
    1. Thanks for your comment. Is it a free tool.

      Delete
  2. Besides, Android isn't going to support Flash either in the nearby future. Flash for mobile is shit, Apple knew it was going to be and they saved a lot of pain.

    ReplyDelete
    Replies
    1. Thanks for your insight into this. I also believe that flash is a trouble on mobile devices. But html5 has still to grow to a level where it could achieve what all can be done in flash.

      Delete