Solved

Urgent - Media Element Not working

Posted on 2010-11-30
6
655 Views
Last Modified: 2012-05-10
Hi,

I have a media element in my wpf application and nothing happens when I click it!!

please see my code below - I need this ASAP

Question worth 1000 points!~
0
Comment
Question by:Trying_to_Learn
  • 3
  • 3
6 Comments
 

Author Comment

by:Trying_to_Learn
ID: 34241202

'The button which plays the video element

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button2.Click
            MediaElement1.Play()
            MediaElement1.IsEnabled = MediaElement1.IsLoaded
            Button_Coder_Trailers(Button2)
        End Sub
' The code for the media element
<MediaElement Source="/MoviesOnTheGo;component/morningglory_trlr_01_480p_dl.wmv" Name="MediaElement1" LoadedBehavior="Play" Margin="0,0,0,0" Stretch="Fill" UnloadedBehavior="Manual" />

Open in new window

0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34242806
Are you sure the source address is correct?
0
 

Author Comment

by:Trying_to_Learn
ID: 34244040
Yes the source address is correct, or else it would give me an error in the xaml
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 34246466
Two points

1) MoviesOnTheGo;component (you are using ; in a path?)

2) In Microsoft examples, they use \ instead of / that you are using in the path.

http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.source.aspx
0
 

Author Closing Comment

by:Trying_to_Learn
ID: 34248365
Thanks!
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34248402
What was the problem?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question