Answered by:
Problem with MediaElement.Position in client machine in silverlight alpha refresh 1.1

Question
-
Hi,
I have written a small application in silverlight using blend 2, where I am setting the postion of a video by using the following line of code
theMedia.position = "00:00:10";
The video is encoded by using the microsoft expression media encoder preview. This code is working fine in my development computer and giving no error message. But whenever I m trying to run the application from another machine. And trying to set the position it is giving the following error.
Silverlight error message
ErrorCode: 2203
ErrorType: RuntimeError
Message: AG_E_RUNTIME_SETVALUE
MethodName: Positionit simply seems that the video is taking the postion value while it is in my development machine. But whenever I am putting this in some other machine it is giving this error. Can you please suggest what could be the problem
I have already tried by instaling silverlight blend and silverlight media encoder in the other machine. Also i have tried by installing windows media codec 11 sdk. But still I m in the middle of nowhere.
Wednesday, September 5, 2007 12:54 PM
Answers
-
I'd maybe guess that the problem may be that the video has not fully loaded when you try to set the position? Any way that could be the problem - remember it loads the video Async...
- Dave
Wednesday, September 5, 2007 1:16 PM
All replies
-
I'd maybe guess that the problem may be that the video has not fully loaded when you try to set the position? Any way that could be the problem - remember it loads the video Async...
- Dave
Wednesday, September 5, 2007 1:16 PM -
Could possibly be yet another bug. I'm having the same problem, while my video is in the middle of playing I'm trying to set the position with JavaScript and it's a no go. Matter of fact, I can't even get the current position while the movie is playing either from JavaScript. It just returns TimeSpan, which cannot be converted in JavaScript.
Friday, September 7, 2007 8:15 AM -
Hi Dave,
Thank you for your response. I was been able to set the position of the media and play it by handling the opened event of the media element. now it is working fine without giving any error. but I think to play video i will require to have WMP 10 installed n the client.
Thanks a load for your help
- Tiklu
Friday, September 7, 2007 9:24 AM -
Awesome!
- Dave
Friday, September 7, 2007 12:13 PM -
Could possibly be yet another bug. I'm having the same problem, while my video is in the middle of playing I'm trying to set the position with JavaScript and it's a no go. Matter of fact, I can't even get the current position while the movie is playing either from JavaScript. It just returns TimeSpan, which cannot be converted in JavaScript.
Try Position.Seconds. This is a double-precision value which represents the number of seconds since the start of the media. It is the only read/write property of the TimeSpan class in the 1.0 runtime (Position and NaturalDuration are both of type TimeSpan).
If your media file does not support "seek" operations, then setting this property will have no effect.
Monday, September 10, 2007 2:39 AM