Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Urgent - Media Element Not working

Posted on 2010-11-30
6
654 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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