But this didn't solved the problem as well. But this extension will stop gnome shell from being idle, which will avoid locking your screen. So now it was time to dig more into this problem. After going through various forums i found out that the xserver has a power management mode and a screensaver which will actually turn off the display to save power. And for my surprise this had a default timeout of 10 mints :).

So i did a small modification to the above extension (which i will submit as a patch to the original developer later after some testing), which will execute the javascript statement on disabling screen locking :

Util.spawn(['xset', 's', 'off']);

And on enabling screen locking :

Util.spawn(['xset', 's', 'on']);

What the above "xset s" does is enabling and disabling the screensaver of xserver.

So at least now i have a solution for VLC when watching movies. Hope that this support will added into VLC core soon so that we don't need to have a extra extension installed.