Wrox Programmer Forums
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2009, 08:20 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Playing videos using XML

Hello Friends,

I'm playing video(s) in my web site. The details of the videos are stored in a XML file and the information are displayed in the gridview. There is play button in each row and as i click on the play button a video of that row is played. But there is problem is IE its caching the videos and playing the same video even i click on other video button. Its working fine in Flock and Mozilla.....so suggest the way to come out of that problem
 
Old February 12th, 2009, 04:11 PM
Authorized User
 
Join Date: Dec 2008
Posts: 50
Thanks: 1
Thanked 5 Times in 5 Posts
Default

the best way would be to add current time to the path of the videos

say if path of video is

http://www.somewebsites .com/video.flv

change it to

http://www.somewebistes .com/video.flv?time=23844839

so on each refresh of the page the time will be different and will not be cached by the browser.

thanks
 
Old February 14th, 2009, 12:46 AM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

Please clarify your situation. Do you reuse filenames over time for different videos?

Last edited by PeterPeiGuo; February 14th, 2009 at 12:55 AM..
 
Old February 14th, 2009, 01:01 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here i'm again explaining my problem below.


I've a gridview in that gridview i've taken a commmand named "Play" for playing different-different songs and also songs name are unique. Its working fine in the browser "Flock" but caching those videos in Internet Explorer.
here i'm giving the link where i've uploaded it.

http://www.saamstesting.com/Admin/VideoUpload.aspx[^]

Last edited by Manoj Bisht; February 14th, 2009 at 01:23 AM..
 
Old February 14th, 2009, 12:08 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

There was only one row there in the grid, if you put multiple rows we can understand better and be more helpful.
 
Old February 16th, 2009, 12:23 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now i've uploaded more than one videos. I think it'll be easier to understand what i want to explain
 
Old February 16th, 2009, 01:13 AM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

The filename displayed at the top is always one step behind - it shows the file from last click not the current click. That I believe is an issue with event sequence. But that doe snot explain why the video played is always the same one.
 
Old February 16th, 2009, 01:30 AM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

The problem goes away once I set IE to reload page on every visit - done through temperary internet file setting.

I suggest that you try to set cache control to no-cache in your http response, and see whether that solves the issue. Good luck!
 
Old February 16th, 2009, 01:34 AM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

By the way, I know why the ?time= trick didn't work - because that's not the url, not from IE's point of view.
 
Old February 16th, 2009, 02:07 AM
Authorized User
 
Join Date: Apr 2007
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've set the code given below for stopping page being cached. But still getting same problem

Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl = "no-cache";





Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading videos!! ankur_icfai Javascript How-To 1 November 9th, 2006 10:34 AM
Streaming Videos pritambaldota ASP.NET 1.0 and 1.1 Professional 0 August 18th, 2006 06:53 AM
Download videos rajanikrishna HTML Code Clinic 1 October 27th, 2005 05:07 AM
Streaming Videos everest General .NET 0 October 13th, 2005 09:08 AM
Playing music in C# Fightfish C# 0 June 26th, 2005 08:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.