Thursday, October 27, 2011

2.0 Second Bug(Improving on pause feature t308)

I was able to add the pause feature to a plug-in, removing it from the core as requested. Footnote was used to implement the feature. I must admit that the more prepared I am to throw out my code is less frustrating I am if asked to do so. That was the case with my first attempt at solving the problem. The more I understand what is happening, the better the solution. I am not prepared to throw it out this this time but if I have to, then I will start over with a better understanding. Please view commit

Monday, October 24, 2011

2.0 (Correcting Lint Errors) Completed

I have corrected all lint errors found in all unit tests(t607). This has been a wonderful experience because it allows you to work with different components of the code. It makes you better at debugging code and also finding better ways of making things work more efficiently.

After getting make to run on my window machine,I was all set to debug. please view previous post for "Make" setup.

Tuesday, October 18, 2011

Checking Unit Tests against JSLint

The last time I reported that my new task is t607 and the first challenge was to be able to use the make command to create a lint file. Well, I got it to work on my Windows machine.

This tool is used for finding lint errors within the js code. The command to get the lint information is "make lint-unit-test." This did not work at first because he make.exe was not available. I was advised to install MINGW32 on my machine which had "make.exe" available with it. I was also informed that if you build Firefox that the feature should be available in the browser. However, all i did was to install MINGW32 and that actually worked. I also installed "node.js" but I am not sure if this played a part in it working. If you have more information on this please leave a comment. That would be well appreciated.

Well I am now ready for fixing those lint errors found in several js files.

I have some recommendations on my previous bug(t308) so that it can be landed. It was pushed from 1.0 to 1.1. So I still have some work to do.

Friday, October 14, 2011

New Assignment t607

My first task is up for review. This is a wonderful feeling of getting somewhere. The first task involved putting the pause feature on a popcorn object. View Code

I have been assigned a new task which includes working on the unit test lint errors. Before actually checking the unit tests, I first have to figure out getting the Make feature to work on my machine.

Thursday, October 6, 2011

Release 0.1 Cont'd (T308)

With determination and perseverance a fix was implemented that actually produced some positive results. Thanks to Hasan for his help towards finding a solution. This is what community effort is all about. The challenge was finding where to actually put it. I must admit that I am still very far from really understanding the core but I am becoming more familiar with it.

Solution:

if ( byStart.pause ) {
window.setTimeout(function(){
obj.play();
}, byStart.pause );
obj.pause();
}

"byStart" is the object that holds all the properties such as Start, End, Pause(new feature)...

Several other changes has to be made to make it fully integrated into the core allowing the user to enter 5 for seconds instead of 5000 as it is at this point.

Using feature:

{
start: 20, // seconds
end: 45, // seconds
pause: 5000, //New pause feature option.
text: 'Visit webmademovies.org for more details',
target: 'footnotediv'
}

Saturday, October 1, 2011

Release 0.1 Cont'd

Several hours(12) of work today went into understanding the core of Popcorn in relation to adding a pause feature to a Track Event. In order to get an idea of how advance JavaScript works, reference was made to Douglas Crockford Online Teaching which helped in the process.

The first phase includes finding areas where change might be necessary. Scott's suggestion to use the feature would be as follows:

Popcorn("#video").trackevent({
start: 10,
end: 10,
target: 'container-div',
pause: 5
});

The following updated were made:

Added trackevent video duration for pause:

Popcorn.addTrackEvent( that, {
start: videoDurationPlus,
end: videoDurationPlus,
pause: videoDurationPlus
});

Included line to converted 'pause' to seconds:

track.pause = Popcorn.util.toSeconds( track.pause,obj.options.framerate);

Efforts are mainly focused on setting up properties.