rejetto forum

Software => HTML & templates => HFS ~ HTTP File Server => RAWR-Designs => Topic started by: salmanshah on May 11, 2012, 07:07:31 PM

Title: How to stream mkv files directly in web browser?
Post by: salmanshah on May 11, 2012, 07:07:31 PM
Hi,
Is there any way to stream mkv files directly in web browser from hfs?
Title: Re: How to stream mkv files directly in web browser?
Post by: TSG on May 13, 2012, 11:33:10 AM
I think Live supports it via DivX Web Player, I may be wrong.
Title: Re: How to stream mkv files directly in web browser?
Post by: point4fun on March 12, 2013, 09:46:21 AM
TSG, how to play all media files in browsers at the moment there is just FLV files playing in my site i am using your latest RAW theme
Title: Re: How to stream mkv files directly in web browser?
Post by: salmanshah on March 12, 2013, 08:41:24 PM
I am also wondering the same.
Title: Re: How to stream mkv files directly in web browser?
Post by: BetaGuru on March 17, 2013, 06:03:44 PM
It's not perfect and I haven't had time to hammer out all the bugs, since most time goes to setting up a private server, but I seen the post and had been wanting to do the same for awhile now and came up with this, first open this file.  "G:\MiniServ-1\template\rawr_default\code\rawr_previewbox.js" and then change the section Labeled //Initialization to the following:

// Initialisation
function initBox(target,file) {
   ext = file.substring(file.lastIndexOf('.'),file.length);
   ext = ext.toLowerCase();
    if (disable == false) {
        disable = true;
        setTimeout('disable=false;', 350);
      if(target != boxOpen) {
         if(boxOpen!=null) boxFade(boxOpen,'out');
         if(ext.match('.jpg|.jpeg|.png|.bmp|.tif|.tiff')) spawnIMGBox(target,file);
         else if(ext.match('.flv|.mp3|.mp4|.m4a|.mov|.aac|.3gp')) spawnRAWRBox(target,file);
         else if(ext.match('.divx|.avi')) spawnDIVXBox(target,file);
         else if(ext.match('.vob|.mkv|.mpg|.webm|.wmv|.wma')) spawnWMBox(target,file);
         else if(ext=='.swf') spawnSWFBox(target,file);
         else if(ext=='search') spawnSEARCHBox(target,file);
      } else {
         boxFade(boxOpen,'out');
      }
    }
}

as stated its not perfect has a few issues at times and needs a bit of work overall, like some webm files only play the audio, some play fine, some start to play as if they are ok then crash the player. As for mkv files they play great on all the ones I tried they being the subject of this post, although the buffering of the player needs adjusted to at least 10 to 15 seconds or the video maybe jerky at the start.