Hi Roger,
I still cannot reproduce this problem on my side. As Bruce suggested, first
try to add following HTTP header in the response to see if it works:
context.Response.AddHeader("Accept-Ranges", "bytes");
Refer to Header Field Definitions:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Please let me know if you made progress on this issue. I'll try to find a
mchine that can reproduce this issue.
Regards,
Allen Chen
Microsoft Online Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: Cannot jump to new part of Silverlight video when using
handler
| thread-index: AclGCAbQg8ZDlearR8yLrR5iezrDyg==
| X-WBNR-Posting-Host: 207.46.193.207
| From: =?Utf-8?B?Um9nZXIgTWFydGlu?= <(E-Mail Removed)>
| Subject: Cannot jump to new part of Silverlight video when using handler
| Date: Thu, 13 Nov 2008 19:21:04 -0800
| Lines: 112
| Message-ID: <8F24EAA1-3E75-4BE0-952A-(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:79857
| NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| This is a follow-up to my post "Silverlight video doesn't work when file
is
| streamed from handler in ASP.net" at
|
http://www.microsoft.com/communities...aspx?dg=micros
oft.public.dotnet.framework.aspnet&mid=e9a38d03-83a8-41fc-8950-5ee60d2a18a5.
|
| I have a web site under .NET 2.0 that renders videos using the Silverlight
| media player. When I stream the video file (.wmv) to the browser via a
| hard-coded link to the file, all is well. And when I use an HTTP handler
to
| stream the video to the browser, it also plays. BUT... when I use the
handler
| the Silverlight player has a problem - I cannot jump to different
portions of
| the video by dragging the position indicator or clicking a new possition.
| When I try, the center of the player turns into rotating circles and
inside
| it says "0". In other words, it is telling me to wait as it moves to the
new
| position, but it never does.
|
| Furthermore, once I attempt to go to a new position, the Play button no
| longer works and there is nothing I can do to get the video to play short
of
| reloading the page.
|
| I set up two demonstration pages:
|
http://www.galleryserverpro.com/dev/webapp2/video2.aspx - This uses the
| handler and demonstrates the issue. Notice that - for example - you
cannot
| move the cursor to the middle of the video and click Play.
|
|
http://www.galleryserverpro.com/dev/...nohandler.aspx - This
is
| identical to the first page, except instead of using the handler it
| hard-codes a direct link to the .wmv file. You can jump around to
different
| sections without any trouble.
|
| Using the first link above, I see the issue in these setups:
|
| Win 2008 Server / FF3
| Vista / FF3
| Win XP / FF2
| Win XP / IE6
|
| Interestingly, the handler *does* work in IE7 (Win 2008 Server and Vista).
|
| Below is the HTTP handler:
|
| using System.IO;
| using System.Web;
|
| namespace WebApplication2.handler
| {
| [System.Web.Services.WebService(Namespace = "http://tempuri.org/")]
| [System.Web.Services.WebServiceBinding(ConformsTo =
| System.Web.Services.WsiProfiles.BasicProfile1_1)]
| public class getmediaobject : IHttpHandler
| {
| #region IHttpHandler Members
|
| public bool IsReusable
| {
| get { return true; }
| }
|
| public void ProcessRequest(HttpContext context)
| {
| ProcessMediaObject(context,
| context.Server.MapPath("~/video/3StrikesChipmunk_56.wmv"));
| }
|
| #endregion
|
| private void ProcessMediaObject(HttpContext context, string filePath)
| {
| FileStream fileStream = null;
| try
| {
| context.Response.Clear();
| context.Response.ContentType = "video/x-ms-wmv";
| context.Response.Buffer = false;
|
| HttpCachePolicy cachePolicy = context.Response.Cache;
| cachePolicy.SetExpires(System.DateTime.Now.AddSeconds(2592000)); //
30
| days
| cachePolicy.SetCacheability(HttpCacheability.Public);
| cachePolicy.SetValidUntilExpires(true);
|
| const int bufferSize = 32768;
| byte[] buffer = new byte[bufferSize];
| long byteCount;
| fileStream = File.OpenRead(filePath);
| context.Response.AddHeader("Content-Length",
| fileStream.Length.ToString());
| while ((byteCount = fileStream.Read(buffer, 0, buffer.Length)) > 0)
| {
| if (context.Response.IsClientConnected)
| {
| context.Response.OutputStream.Write(buffer, 0, buffer.Length);
| context.Response.Flush();
| }
| else
| {
| return;
| }
| }
| }
| finally
| {
| if (fileStream != null)
| fileStream.Close();
|
| context.Response.End();
| }
| }
| }
| }
|
| Thanks for your help!
| Roger Martin
| Gallery Server Pro
|