These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

filevista and stream Big Video Files

Hi.
We want to use filevista for manging big size vide files on local network, but when we want to play those files, browser save it on hard disk and then play it.this is not good for us because it is timeconsuming (file size is bigger than 1GByte).
if we can stream media in filevista over network with programs like Windows media player or VLC player and ... , our problem will solve.
please help us.
kia 6/5/2009 7:50 AM
Hi,
If you double-click on files, FileVista will force saving of the file.
However, if you right-click and click "Open With > Web Browser" option, the file will be directly opened and this should cause a media player to stream the file.
Cem Alacayir 6/16/2009 6:09 AM
We are looking at making a silverlight player to handle this and want it to be invoked from the right click of the media file.... not sure if we have the budget to get a developer involved at this stage but thats our ultimate goal.
Rob Atkinson 6/26/2009 10:41 AM
Actually, you can add a custom action to the context menu by modifying some files.

If you need to add a new suboption under “Open With” option in the context menu then open FileVista\FileVistaControl\ui\default.menus.xml
Find this menu item in the xml file:

    <Item command="OpenWith" text="106" icon="openwith.png">
      <Menu>
        <Item command="OpenWithWebBrowser" text="107" icon="webbrowser.png" value="Download" />
      </Menu>
    </Item>

You can see that there is a sub menu item with command “OpenWithBrowser”.
Text attribute is the string key in the language file. Icon attribute is the name of the image file found in FileVista\FileVistaControl\images\menu folder.
Value attribute sets the required permission for this menu item to be enabled.
For instance OpenWithBrowser item is only enabled if the user has Download permission.
You can add your custom menu item like this:

    <Item command="OpenWith" text="106" icon="openwith.png">
      <Menu>
        <Item command="OpenWithWebBrowser" text="107" icon="webbrowser.png" value="Download" />
        <Item command="OpenWithCustom" text="400" icon="someimage.png" value="Download" />
      </Menu>
    </Item>

Note that for this new example item OpenWithCustom, you will need to add the string to the language file FileVista\FileVistaControl\languages\en.xml with the key 400. You will also create someimage.png in FileVista\FileVistaControl\images\menu folder if you want an icon to be displayed. Else you can exclude icon="someimage.png"
              
After you add new your menu item, you should add your code corresponding to the new command.
Open FileVista\FileVistaControl\scripts\filevista.js and search for case "OpenWithWebBrowser":
This switch branch is in function executeCommand(command, parameter)
So you will add a new branch for your new menu item under the branch for OpenWithWebBrowser in this function:

            case "OpenWithCustom":
                  // Your custom code here
                  break;
Cem Alacayir 7/6/2009 4:52 PM
Thanks Cem really helpful, one more thing.. I can successfully pass the fileName to another page but how do I get the filepath? 
Cheers
Rob
Rob Atkinson 7/9/2009 9:58 AM
For security reasons, the underlying physical path will not be exposed on the client-side. However for your case, I think you need URL of the file rather than the path on the server for the Silverlight player. You can combine currentFolder.relativePath with a hardcoded base URL to find out the file url:

var baseUrl = "http://mysite";
var fileUrl = baseUrl + currentFolder.relativePath + "/" + fileName;
Cem Alacayir 7/21/2009 4:44 PM