473,769 Members | 3,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot jump to new part of Silverlight video when using handler

This is a follow-up to my post "Silverligh t video doesn't work when file is
streamed from handler in ASP.net" at
http://www.microsoft.com/communities...0-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.Serv ices.WebService (Namespace = "http://tempuri.org/")]
[System.Web.Serv ices.WebService Binding(Conform sTo =
System.Web.Serv ices.WsiProfile s.BasicProfile1 _1)]
public class getmediaobject : IHttpHandler
{
#region IHttpHandler Members

public bool IsReusable
{
get { return true; }
}

public void ProcessRequest( HttpContext context)
{
ProcessMediaObj ect(context,
context.Server. MapPath("~/video/3StrikesChipmun k_56.wmv"));
}

#endregion

private void ProcessMediaObj ect(HttpContext context, string filePath)
{
FileStream fileStream = null;
try
{
context.Respons e.Clear();
context.Respons e.ContentType = "video/x-ms-wmv";
context.Respons e.Buffer = false;

HttpCachePolicy cachePolicy = context.Respons e.Cache;
cachePolicy.Set Expires(System. DateTime.Now.Ad dSeconds(259200 0)); // 30
days
cachePolicy.Set Cacheability(Ht tpCacheability. Public);
cachePolicy.Set ValidUntilExpir es(true);

const int bufferSize = 32768;
byte[] buffer = new byte[bufferSize];
long byteCount;
fileStream = File.OpenRead(f ilePath);
context.Respons e.AddHeader("Co ntent-Length",
fileStream.Leng th.ToString());
while ((byteCount = fileStream.Read (buffer, 0, buffer.Length)) 0)
{
if (context.Respon se.IsClientConn ected)
{
context.Respons e.OutputStream. Write(buffer, 0, buffer.Length);
context.Respons e.Flush();
}
else
{
return;
}
}
}
finally
{
if (fileStream != null)
fileStream.Clos e();

context.Respons e.End();
}
}
}
}

Thanks for your help!
Roger Martin
Gallery Server Pro
Nov 14 '08
13 4015
Hi Roger,

Today I tested this page
http://www.galleryserverpro.com/dev/webapp2/video2.aspx

on the following machines:

Windows Server 2008 Enterprise SP1 64 bit + FireFox 3.0.3
Windows XP SP2 + FireFox 2.0.0.18
Winodws Server 2003 Enterprise SP2 32 bit + FireFox 3.0.4
Windows Server 2008 Standard SP1 64 bit + FireFox 3.0.4
Windows XP SP3 + IE 6.0.2900.5512

However, I cannot reproduce this issue. Bruce, can you reproduce this issue
on your side?
I'll update here if I find a machine that can repro it.

Regards,
Allen Chen
Microsoft Online Support

--------------------
| Thread-Topic: Cannot jump to new part of Silverlight video when using
handle
| thread-index: AclGfp9QM5BIKWG VRvyn/OKGRjmjaw==
| From: =?Utf-8?B?Um9nZXIgTWF ydGlu?= <rd******@commu nity.nospam>
| References: <8F************ *************** *******@microso ft.com>
<lq************ **@TK2MSFTNGHUB 02.phx.gbl>
<75************ *************** *******@microso ft.com>
<O$************ **@TK2MSFTNGP05 .phx.gbl>
<E5************ *************** *******@microso ft.com>
<72************ *************** *******@microso ft.com>
| Subject: Re: Cannot jump to new part of Silverlight video when using
handle
| Date: Fri, 14 Nov 2008 09:30:01 -0800
| Lines: 24
| Message-ID: <0E************ *************** *******@microso ft.com>
| 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.publi c.dotnet.framew ork.aspnet
| Path: TK2MSFTNGHUB02. phx.gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7989 9
| NNTP-Posting-Host: tk2msftibfm01.p hx.gbl 10.40.244.149
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Buffering is already turned off, as you can see in the code I posted.
|
| I am pretty sure that adding range functionality won't solve the issue.
Note
| that I am not actually streaming the video, in the strict definition of
| streaming. I am simply transmitting a file, and Silverlight has the
| capability to begin playing the video when it has buffered enough of the
| downloaded video. Ranges are not used anywhere in the request or
response,
| even in the examples that work.
|
| As I said before, you can see for yourself by looking at my examples.
|
| If knew how to easily add range functionality, I would do it just to see.
| But it is not at all clear (at least to me) how to do it based on the
spec
| (http://www.w3.org/Protocols/rfc2616/rfc2616.html).
|
| Roger
|
| "bruce barker" wrote:
|
| adding range support is easy. see the w3c http 1.1 spec for
particulars. I
| don't see how any streaming service could work reliably without range
| support.
| >
| also be sure to turn buffering off.
|

Nov 17 '08 #11
I appreciate your effort in trying to repro it. Just to be clear, here are
the steps:

1. Load the page http://www.galleryserverpro.com/dev/webapp2/video2.aspx.
2. Wait for the video to download (the progress bar goes all the way to the
right).
3. Using the mouse, click the position indicator and drag to a new position.
Release the mouse button.
4. A set of circles will rotate around the number zero in the center of the
video.

At this point the video will not run when you click play. (In my tests, the
only browser where it *does* work is IE7.)

Thanks for your persistence, Allen.

Roger

"Allen Chen [MSFT]" wrote:
Hi Roger,

Today I tested this page
http://www.galleryserverpro.com/dev/webapp2/video2.aspx

on the following machines:

Windows Server 2008 Enterprise SP1 64 bit + FireFox 3.0.3
Windows XP SP2 + FireFox 2.0.0.18
Winodws Server 2003 Enterprise SP2 32 bit + FireFox 3.0.4
Windows Server 2008 Standard SP1 64 bit + FireFox 3.0.4
Windows XP SP3 + IE 6.0.2900.5512

However, I cannot reproduce this issue. Bruce, can you reproduce this issue
on your side?
I'll update here if I find a machine that can repro it.

Regards,
Allen Chen
Microsoft Online Support
Nov 17 '08 #12
Hi Roger,

I followed exactly the same steps as you mentioned but still cannot
reproduce this issue. It's really strange. Could you outline all the
machines and browsers that you have tested? Maybe we can find some clues
from it. (Please provide the detailed information, such as Windows Server
2008 Enterprise SP1 64 bit + FireFox 3.0.3)

In addition, please run Network Monitor on the working machine and the
non-working machine. Then track the frame of the response of the ashx. Can
you find any differences?

Regards,
Allen Chen
Microsoft Online Community Support

Nov 18 '08 #13
Hi Roger,

Do you have any progress on this issue? Can you get any clues with the help
of Network Monitor?

Regards,
Allen Chen
Microsoft Online Community Support

Nov 21 '08 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5480
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
0
944
by: kcamhi | last post by:
Is there a way in either windows media player object or directshow (or other) to play a very specific subset of a video file? I have a single video file that I'll load that has a bunch of segments that I want to be able to jump to in reaction to different events and play from a specific frame to another specific frame. Is there any way to do that in WMP? Or if not does Directshow or another method support this?
2
7892
by: hzgt9b | last post by:
Using VS2003, VB.NET, BACKGROUND I have a window forms based application that will be distributed and executed directly from CD media. The app contains a TreeView control and a WebBroswer (AxSHDocVw.AxWebBrowse) control. The TreeView is populated with nodes that when clicked play an audio clip that is stored on the CD and navigate the browser control to a specified web URL (also stored on the CD). All the web URLs are html documents...
4
1876
by: Ronald S. Cook | last post by:
I'm a Visual Studio developer confused by seeing these new products coming out... Expression and Silverlight. Is Expression maybe a successor to FrontPage and is Silverlight maybe something to compete with Flash? Are Visual Studio, Expression, and Silverlight expected to exists together (and in some sort of harmony) in a development shop, or is something else going on.
1
2859
by: Faisal Shafiq | last post by:
I want to upload a file direct to the Silverlight Streaming Service from a Web Client such as silverlight application. As per our product requirement we want to upload a .WMV file directly from silverlight client to Silverlight streaming service. I tried to user WebClient and HttpWebRequest for that purpose but, unfortunately I can found the way to do so. There are some problems with both classes. 1. There is no property of get...
3
3546
by: AliR \(VC++ MVP\) | last post by:
Hi Everyone, I have written a silverlight application, which talks to a WCF service, which was created within the website after watching this video: http://silverlight.net/learn/learnvideo.aspx?video=47177 The service gathers some data using a class library. This all works fine within Visual Studio, but when published to a web server it throws an excpetion, in the first xxxxServiceComplete call back, which
3
8650
by: pavanip | last post by:
Hi, I am new to Silverlight application.I want to display video using Mediaelement tag and I used the below code to play video. <Canvas> <MediaElement x:Name="mPlayer" Width="640" Height="480" Source="a_video.avi"/> <Button x:Name="bPlay" Background="Green" Width="100" Height="45" Canvas.Left="8" Canvas.Top="497" Content="Play" /> <Button x:Name="bPause" Background="Yellow" Width="100" Height="45"...
0
1647
by: pavanip | last post by:
Hi, I am new to Silverlight Applications. I created one media player control to play video in asp.net website.I want to drag and drop that media player control to desired place when we run the application but there are no events to drag and drop the video. I tried media element control its working fine for drag and drop functionality but i want that feature in media player control. Is there any other alternatives to drag and drop videos to...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7404
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.