Sunday, May 19, 2013
Loading videos on the fly using video.js
Video.js doesn't have a lot of documentation when it comes to doing really cutom stuff. For example, loading videos using a partial postback and changing the subtitles. Fortunately I'm not the first one to run into this problem, and I found this link that shows how to do it. It works in Chrome and Firefox. IE 8/9 is different because it's Flash, so you have to check the browser type before executing the code.
Tuesday, May 14, 2013
Uncaught Error: ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node
This problem happens when you call applyBindings. The problem here is that your view is a jQuery object, not a DOM element. It can be fixed by appending [0], as described here.
Monday, May 13, 2013
Binding a partial view with knockout
If there's a part of your view which you don't want to bind right away, you can defer it very easily. The basic solution is to include this code:
You can also check out this detailed solution.
ko.bindingHandlers.stopBinding = {
init: function ()
{
return { controlsDescendantBindings: true };
}
};
<section>
<!-- ko stopBinding: true -->
<div></div>
<!-- /ko -->
</section>
You can also check out this detailed solution.
Monday, April 1, 2013
IIS ends debugging session because of a timeout
When debugging SharePoint code in Visual Studio, sometimes the debugging session will end unexpectedly. If the error is "Web site worker process has been terminated by IIS", then removing the timeout is really easy. You just need to set Ping Enabled to false and the Ping Maximum Response Time to a really large number. You can also follow these instructions.
Thursday, March 28, 2013
HTML5 video
One of the best options is VideoJS. I recently looked into it and found these advantages:
1) It works with IE8. It seems to use a Flash player wrapper to play the mp4 video.
2) It supports subtitles and captions in different languages.
3) It's simple to use. You can get started with just a few lines of code.
4) I found Firefox doesn't support mp4, but ogg files will work.
5) It works in mobile devices without any support.
6) It's open source
Sunday, January 13, 2013
Continuous integration for iOS using Hudson
Lately I've been involved in mobile projects, and CC.NET is obviously not a choice for continuous integration. I've been reading a lot of good comments on Hudson so I gave it a try. It's really easy to install, just download Tomcat and drop the hudson .war file in the webapps folder. Then run ./startup.sh and you have Hudson running!
Well, that's the first part. The second part is configuring your projects. Everything is really simple, I just want to point out that you definitely want to install these plugins:
1) Subversion (or a plugin for your preferred source control system)
2) Email-ext
3) Log parses (this is necessary because Hudson was returning a successful build when it actually failed)
The configuration of these plugins is simple so I won't cover that. You'll get errors for sure but a quick google search will get you around them.
Well, that's the first part. The second part is configuring your projects. Everything is really simple, I just want to point out that you definitely want to install these plugins:
1) Subversion (or a plugin for your preferred source control system)
2) Email-ext
3) Log parses (this is necessary because Hudson was returning a successful build when it actually failed)
The configuration of these plugins is simple so I won't cover that. You'll get errors for sure but a quick google search will get you around them.
Sunday, January 6, 2013
Certificate error when connecting to SVN from Xcode
This is a really dumb error. Make sure that in the dialog "Verify Certificate" you click "Show Certificate" and then check "Always trust "servername" when connecting to "url".
Subscribe to:
Posts (Atom)