OSD700 project release 0.6

Continuing on from my OSD 700 release 0.5 I now I have the next logical release, as 0.6.

My project is to implement hash change media fragment refresh on media documents. Example: Open a media document in a new tab, change the hash tag in the URI to a new number, and hit enter. This is called a media fragment, and changes should update the video’s position. If you do not have my changes though, this will not do anything.

I have gone through a few iterations for this patch, and finally have something that is passing review. It has some nits that I am fixing and was hoping to have fixed for this release, but I hit some issues in the build process and could not wait any longer. Whenever I try to build, it fails saying files were modified externally during the build.

What I am doing in this final commit is similar to what I was trying in my last post. I am inserting a script into the media document’s head, that listens for a hash change and updates the video. If you look in my last post you will see the script I insert, but now it is a simple inline script:

window.addEventListener('hashchange',function(e){document.querySelector('audio,video').src=e.newURL;},false);

That’s it, I just set the media element’s source to the new URI in a hash change event. The advantages to this is we can use the parse media fragment c++ code and our changes are pretty modular enough that we are highly unlikely to break anything.

I had a lot of fun on this release. Felt more productive. During the last bit leading up to this release I got to go back and forth with Boris Zbarsky a couple times, getting some review minuses, and felt I was getting a better handle on the code, knew what he was talking about, and how to implement it. Slowly getting over the learning curve. Every project or codebase I have been in has this moment, and is pretty exciting!

I still need to figure out testing though, and figure out why my builds are failing. I am doing a clobber build now, so we’ll see soon.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: