Smile

Smile

  • 1.5k
  • 202
  • 37k

Getting files are being used by other process while playing

Feb 2 2018 12:44 AM
I am displaying video files from a local folder creating a playlist and passing them to embed windows media player.I am starting the display by button click even.how to clear the playlist from media player.when i again click on button i am getting error as file is being used by other process.
 
aspx code
 
<embed id='embed1' runat="server" name='mediaPlayer' type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='false' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='500' designtimesp='5311' loop='true' style="position:absolute; top: 76px; left: 446px; height: 363px;"/>
 
button event
 
protected void btnsubmit_Click(object sender, EventArgs e)
{
string urlstr = Server.MapPath("~/bin") + "\\Images\\Playlist1.wpl";
Clearplaylist();
embed1.Attributes.Remove(urlstr);
embed1.Attributes.Add("src", urlstr); // here i am passing the playlist for playing
}
 
how to dispose the files or release them for further being used

Answers (3)