Reputation: 180
I embeeded the media player in my jsp using struts2 as i retrive the pathfrom the Database and read the content from the folder in my local system it is working fine But when i acces my web page in other system i am unable to play it and here is my code
<object width="320" height="384"
standby="Loading Windows Media Player components..."
type="video/x-ms-asf"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
style="background-color: #000000;">
<param name="autostart" value="1">
<param name="uiMode" value="full" />
<param name="autosize" value="1">
<param name="playcount" value="1">
<param name="height" value="384" />
<param name="width" value="320" />
<param name="autoStart" value="1" />
<param name="autoPlay" value="1" />
<param name="AnimationatStart" value="1" />
<param name="showdisplay" value="1" />
<param name="TransparentAtStart" value="0" />
<param name="ShowControls" value="1" />
<param name="ShowStatusBar" value="1" />
<param name="ClickToPlay" value="0" />
<param name="bgcolor" value="#000000" />
<param name="volume" value="100%" />
<param name="InvokeURLs" value="0" />
<param name="loop" value="0" />
<embed type="application/x-mplayer2" width="320" height="384"
autostart="true" showcontrols="true"
src="\\C:\\Users\\raghavender.g\\Desktop\1.mp4" />
</object>
</div>
Upvotes: 0
Views: 574
Reputation: 54816
The problem is with this part:
<embed type="application/x-mplayer2" width="320" height="384"
autostart="true" showcontrols="true"
src="\\C:\\Users\\raghavender.g\\Desktop\1.mp4" />
You can't source the video data in from a file local to your server machine and have it work on a client machine. You need to host the video file on your server as well, and then change your embed
to something more like:
<embed type="application/x-mplayer2" width="320" height="384"
autostart="true" showcontrols="true"
src="http://myserver.com/videos/Desktop1.mp4" />
Upvotes: 1