Click here to Skip to main content
15,909,051 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have many files in .gsm format. I did put all them in a gridview and embedded a VLC player plugin corresponding to each file/row. When i try to play a file on client PC, the player search for the file on client PC. I want it to pick the file from the server and play on client when requested. Here is the code:

<embed type="application/x-vlc-plugin" autoplay="no" loop="yes" height="30" target="<%#Eval("file") %>" /> 

<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab"></object>


Where <%#Eval("file") %> provides the path of file to be played. On server it works fine but on client it doesn't work because the player searches for that file path on client pc which doesn't exist.

Please help me out to solve this problem..
Posted
Updated 22-Jul-14 1:22am
v2
Comments
Kornfeld Eliyahu Peter 22-Jul-14 7:23am    
What Eval("file") actual value is?
Manudhiman 22-Jul-14 7:28am    
"file" is the column-name of datatable which is bound to gridview. This column contains the path of all the files.. suppose "D:\media\music1.gsm"
File could be a gsm, mp3, wav
Kornfeld Eliyahu Peter 22-Jul-14 7:30am    
I understand that it's a column from which the actual value comes. But what that actual value is - a sample value will do...
Manudhiman 22-Jul-14 7:36am    
sample value is

file:///D:\filename.gsm
Manudhiman 22-Jul-14 7:35am    
Here is the snapshot

http://s9.postimg.org/p88zt8q7j/aaa.jpg

1 solution

According to your explanation you try to link VCL player to some file with path like D:\filename.gsm...
That D: is corresponding to one of the dries on your server!!! However when client see it it will interpret it as his local D: (or error if no D: presents) and it is expected as nowhere you told your page that it's a server D:...
If you look around you can see that all file links on the web are of type http or ftp. Look at your own link posted with the screenshot.
To solve the problem you may do one of these:
1. Create a page that can stream your file to the client - Stream Your Documents Using Simple Web Page[^]. In that case your code will look like this:
HTML
<embed type="application/x-vlc-plugin" autoplay="no" loop="yes" height="30" target="FileStream.aspx(<%#Eval("file") %>)" />

2. Share your files (or folder containing the files) via IIS to make it visible to the outside world and link the VCL layer to it...
This may help you - http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-webdav-on-iis[^]
---
IMHO - the first option is better...
 
Share this answer
 
Comments
Kornfeld Eliyahu Peter 22-Jul-14 8:04am    
I do not know how did you implemented the streaming, but the solution in the article enables you to stream different files on the same page - file for link...
Dnyati 11-Jul-16 9:31am    
Is it working I am having same issue. Tries file streaming but seems not working. Can you please put working solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900