473,327 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

C#-APP: Media Player Control

Im writing an application in C# which will be used to play media via the windows media control from a playlist. I have been able to play media through the control and use the PlayStateChange event to detect when the media has finished. All well and good.

What Id like to do however is encapsulate this functionality so that I pass a media filename to some object which then plays it and notifies me when its finished playing. I just cant think of the best way of doing this.

Would it make any sense to wrap up this functionality in a worker thread or something similar? Or am I just overcomplicating things for no practical reason?
Oct 14 '08 #1
1 1868
joedeene
583 512MB
I would read the values from the Player.playState property, and have a background thread perform a while..loop statement, with if...else statements in between to make the player on the main thread perform the requested actions.

joedeene
Oct 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Pedro | last post by:
Hello, I'm having a problem with the Media Player control. Sometimes, when I use the value from currentPositionString property of the Media PLayer Control I get a different value from the one...
0
by: Joachim | last post by:
How can I get the Windows Media Player Control in the toolbox of Visual Studio .NET 2005? The control used in the samples I have for .NET 2005 uses a control named AxWMPLib.AxWindowsMediaPlayer in...
0
by: dongarbage | last post by:
Hi there, I've created a user control to put in a web page. I'd like to add a windows media player control to the user control that I've created. But, for some reason, the user control does not...
0
by: Muhammad Ammad Saleem | last post by:
Hi, I have embedded a media player control in my web page and want to play the media from a specified postion given in seconds. I have tried the currentPosition parameter and it does not work...
0
by: PulkitZery | last post by:
Hi, can someone please tell me how can I add Media Player on my web project? I add the reference of window media player and in the toolbox I chose to display the windows media player. But for...
1
by: M Ahmad Bhandara | last post by:
how to use Media player control in Vb.net Forms
3
by: Muhammad Ammad Saleem | last post by:
Hi, I just want to know how to control the Windows Media Player Control using JScript in an ASP .NET page? I have tried going through the Windows Media Player SDK but there is no proper help...
0
by: =?Utf-8?B?amJkYXZpcw==?= | last post by:
I enable the AllowDrop property but there is no DragDrop or DragOver events for the WindowsMediaPlayer control? I want to be able to drag a media file onto the control and set the URL property to...
3
by: Phil | last post by:
Has anyone else had a problem using the AXWindowsMediaPlayer control and VB2008? It all seems to work fine for me, but I have sent my application out to a few other people to test, and I have had...
0
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.