Known issues with Visual basic .net and v 2.7 ?

Aug 21, 2012 at 6:16 PM
Edited Aug 21, 2012 at 6:17 PM

I can't seem to successfully do this in visual basic:

Private Sub UserControl_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs)
        SMFPlayer1.Playlist.Clear()
        Dim aaa As New PlaylistItem()
        aaa.MediaSource = New Uri("http://manaspatnaik.com/blog/downloads/Demolishor_WMV_HD.wmv", UriKind.Absolute)
        aaa.ThumbSource = New Uri("http://manaspatnaik.com/blog/downloads/demolishor.jpg")
        aaa.DeliveryMethod = Microsoft.SilverlightMediaFramework.Plugins.Primitives.DeliveryMethods.ProgressiveDownload
        SMFPlayer1.Playlist.Add(aaa)
        SMFPlayer1.Play()


    End Sub

While I have no problem in c# doing same:

 private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            testplayer.Playlist.Clear();
            //'aaa.MediaSource = New Uri(App.ApplicationHostHttp, New Uri("/ClientBin/PreviewVideos/" & ggg.SampleVideo & ".wmv", UriKind.Relative))
                  
          
            //testplayer.Play();
            PlaylistItem item = new PlaylistItem();
            item.MediaSource = new Uri("http://manaspatnaik.com/blog/downloads/Demolishor_WMV_HD.wmv");
            item.ThumbSource = new Uri("http://manaspatnaik.com/blog/downloads/demolishor.jpg");
            item.DeliveryMethod = Microsoft.SilverlightMediaFramework.Plugins.Primitives.DeliveryMethods.Streaming; //Add PlaylistItem to the Media 
            testplayer.Playlist.Add(item);
            testplayer.Play();

        }

In the VB case, the jpg thumb loads into the playlist, but no video plays. In the C# case, same except the video plays.

I believe I have loaded same References in each project. I created the C# from the project template. Since one was not provided for Silverlight in vb, I started from a straight SL5 project and added references.

Sooo, I suspect I am missing SOMETHING that the template in c# takes care of. Can anyone help me find this, or are there known VB-related shortcomings and that's why there is no project template? I have indeed loaded the Expression preview for SL5.

Paul Smeulders

 

Aug 22, 2012 at 12:18 AM

Hmm, needs system.servicemodel.Web.extensions.

 

nothing to see here. move along.