Skip to main content

Microsoft Silverlight

Answered Question SL 2.0 beta 2: Streaming video not playingRSS Feed

(0)

pmoffatt610
pmoffatt610

Member

Member

70 points

97 Posts

SL 2.0 beta 2: Streaming video not playing

 

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

 

pmoffatt610
pmoffatt610

Member

Member

70 points

97 Posts

Answered Question

Re: SL 2.0 beta 2: Streaming video not playing

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

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities