Reformatiing and improvement of code. Currently working in Safari
I'm now able to dynamically load video segment using ogg as well as mp4 video codecs. Closes #525