Skip to main content
Home Forums Silverlight Programming Programming with .NET - General SL 2.0 beta 2: Streaming video not playing
1 replies. Latest Post by pmoffatt610 on September 26, 2008.
(0)
pmoffatt610
Member
70 points
97 Posts
09-26-2008 12:50 PM |
Hello all,
I have created a media gallery to play videos. I use a carousel created in a class and raise an event to the page when the middle carousel item has been clicked. All of this is working great, however when I try to play the video in a media element nothing happens. This is my first silverlight app so I am most likely missing something very easy. Also, no exceptions are being trapped by the try/catch block and I am seeing the " video should be playing!" string displayed. I used Microsoft encoder 2 to encode the video and the video is in the bin / debug directory. Here is the event handler:
Private Sub playMovie(ByVal selected_item As HTV_Carousel.HTV_CarouselItem)
Dim myChildren As FrameworkElement = cnvs_ProductSelectionCarousel.Children(0)
Try
CType(myChildren, TextBlock).Text = "In PlayMovie Event! " + selected_item.name
VideoWindow.AutoPlay = True
VideoWindow.Source = New Uri("IS_Marketing_Promo.wmv", UriKind.Relative)
VideoWindow.Visibility = Windows.Visibility.Visible
VideoWindow.Play()
CType(myChildren, TextBlock).Text += " video should be playing!"
Catch ex As Exception
txt_userMessages.Text = ex.ToString
End Try
End Sub
Any ideas out there?
TIA,
Patrick
09-26-2008 1:23 PM |
Update:
Thanks to Psychlist1972 for posting about the Media_failed event handler. Using this event I am able to see that the System.Exception: AG_E_NETWORK_ERROR is being thrown. Google Foo Time.
P-Funk