Problem with TrackPlayer behavior

Editor
Apr 28, 2010 at 4:47 PM

Hi,

I am trying to implement the MediaTracking functionality into my WebAnalyticsBehavior.

Here I ran into a problem: I am able to track the Events of the CoreSmoothStreamingMediaElement,

but once I pull the TrackEvent onto the underlying Player in Expression Blend (add the TrackPlayer behavior), the app starts, but immediately turns blank (no GUI elements are shown anymore)

and I get the following TrackEvents from the Player:

----------------------------------------------------
Name: Started
MediaTimeCode: 00:00:00
----------------------------------------------------
Name: Exiting
MediaTimeCode: 00:00:00
----------------------------------------------------
Name: Exited
MediaTimeCode: 00:00:00
(Debug output from my Firebug-Console)
Any ideas, what I could be doing wrong?
my imports are the following: 
I pasted them all, just in case some of them conflict...
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
	xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:mwab="clr-namespace:Microsoft.WebAnalytics.Behaviors;assembly=Microsoft.WebAnalytics.Behaviors"
	xmlns:mwad="clr-namespace:Microsoft.WebAnalytics.Data;assembly=Microsoft.WebAnalytics" 	
	xmlns:p="clr-namespace:Microsoft.SilverlightMediaFramework.Player;assembly=Microsoft.SilverlightMediaFramework.Player"	
	xmlns:mwasmf="clr-namespace:Microsoft.WebAnalytics.Media;assembly=Microsoft.WebAnalytics.SMF" 
	xmlns:mwassme="clr-namespace:Microsoft.WebAnalytics.Media;assembly=Microsoft.WebAnalytics.SSME" 
	mc:Ignorable="d"
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"



The interesting code section would be this (the source of the video is set elsewhere):

        <p:Player x:Name="VideoPlayer" Width="400" Height="300" Margin="112,132,128,48">
            <i:Interaction.Behaviors>
                <mwasmf:TrackPlayer/>
            </i:Interaction.Behaviors>
            <p:CoreSmoothStreamingMediaElement x:Name="CoreSSM"
                AutoPlay="False"
                >
                <i:Interaction.Behaviors>
                    <mwassme:TrackSmoothStreamingMediaElement/>
                </i:Interaction.Behaviors>
            </p:CoreSmoothStreamingMediaElement>
        </p:Player>

and it produces no problems whatsoever when i leave out this part:
<i:Interaction.Behaviors>
      <mwasmf:TrackPlayer/>
</i:Interaction.Behaviors>


Any ideas on this??


I am using the Silverlight 4 SDK, Expression Blend 4 and the compiled version of the framework that can be downloaded in the 'Downloads' section...


I would really appreciate your help...

Thanks in advance,
Jan
Coordinator
Apr 28, 2010 at 7:49 PM

Jan,

You only use the TrackSmoothStreamingMediaElement when you're using the SmoothStreamingMediaElement without the SMF Player.  All of the events from the SmoothStreamingMediaElement are surfaced in the SMF Player and TrackPlayer.

Michael

Editor
Apr 29, 2010 at 7:43 AM

nope, that didn't do the trick... I completely removed the CoreSmoothStreamingMediaElement and

as soon as I add the interaction.behavior part to my player, the page is shown for a fraction of a second and then turns blank (with or without the CoreSmoothStreamingMediaElement)...

I get the exiting -> exited TrackEvents and that's it...

        <p:Player x:Name="VideoPlayer" Width="400" Height="300" Margin="112,132,128,48">
            <i:Interaction.Behaviors>
                <mwasmf:TrackPlayer/>
            </i:Interaction.Behaviors>
        </p:Player>

(the code I am using right now...)

might this be some incompatibility issue with the smf v1.1? in the example in your help v1.0 is mentioned...

Just a wild guess...

Regards, Jan

Editor
Apr 29, 2010 at 8:22 AM

okay, just to make sure I didn't make any mistakes elsewhere in my project I created a new one from scratch...

I simply added one Player element from the Microsoft.SilverlightMediaFramework.Player.dll (v1.1) and put a TrackPlayer on it...

same outcome... blank page

once I remove the TrackPlayer, the Player element (or any UI element for that matter) is shown normally...

 

<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Microsoft_SilverlightMediaFramework_Player="clr-namespace:Microsoft.SilverlightMediaFramework.Player;assembly=Microsoft.SilverlightMediaFramework.Player"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:Microsoft_WebAnalytics_Media="clr-namespace:Microsoft.WebAnalytics.Media;assembly=Microsoft.WebAnalytics.SMF"
    mc:Ignorable="d"
    x:Class="SilverlightApplication6.MainPage"
    Width="640" Height="480">

    <Grid x:Name="LayoutRoot" Background="White">
        <Microsoft_SilverlightMediaFramework_Player:Player Content="Player" Margin="136,129,264,0" VerticalAlignment="Top" d:LayoutOverrides="Width">
            <i:Interaction.Behaviors>
                <Microsoft_WebAnalytics_Media:TrackPlayer/>
            </i:Interaction.Behaviors>
        </Microsoft_SilverlightMediaFramework_Player:Player>
    </Grid>
</UserControl>

 

Only thing peculiar is the standard namespaces of the SMF_Player and webanalytics.Media...

The imported .dll are

  • Microsoft.Web.Media.SmoothStreaming.dll -> v3.0.711.8
  • Microsoft.SilverlightMediaFramework.Player.dll -> v1.2010.114.1
  • Microsoft.SilverlightMediaFramework.Logging.dll -> v1.2010.114.1
  • Microsoft.SilverlightMediaFramework.Data.dll -> 1.2010.114.1
  • Microsoft.SilverlightMediaFramework.dll -> v1.2010.114.1

(The .dlls that are available for download on the smf.codeplex.com homepage)

Coordinator
Apr 29, 2010 at 2:19 PM

Jan, You still need the CoreSmoothStreamingMediaElement in your Player, just don't put a Tracker on it.

Michael

Editor
Apr 29, 2010 at 2:26 PM
Michael, sorry, but it doesn't work... with or without the CoreSmoothStreamingMediaElement I get a blank page... try reproducing what i did.. maybe it works on your system... it does not work on mine... Jan
Coordinator
Apr 29, 2010 at 4:06 PM

Which version of the Analytics framework did you install, the one for Silverlight 3 or the one for Silverlight 4?

Michael

Editor
Apr 29, 2010 at 4:12 PM
okay... that must be the problem... i installed the version from the download section... seems to be the one for silverlight 3... sorry, my bad... where can I get the silverlight 4 .dlls?
Editor
Apr 30, 2010 at 5:30 PM
no, I correct myself, it didn't work... I installed the right framework, triple checked that it's the right version and still get the blank page and the exiting exited events... my analytics service behavior is also built against the silverlight 4 sdk... could you check if it works in general, I'd like to know if the mistake is on my side... nice weekend, see you monday at the live meeting
Editor
May 6, 2010 at 8:01 AM

okay, this problem is resolved now...

 

May 18, 2010 at 11:22 AM

Can you share what did you do to resolve the problem?

 

Thanks

Luis

Editor
May 18, 2010 at 12:21 PM
Hey Luis, install the newest version of the MSAF, you can find it here: http://msaf.codeplex.com/releases/view/44716 Jan
May 18, 2010 at 3:48 PM

Thanks Jan!

Best regards,

Luis Faustino

From: Jan_Reinsch [mailto:notifications@codeplex.com]
Sent: 18 May 2010 12:22
To: Faustino, Luis
Subject: Re: Problem with TrackPlayer behavior [msaf:210880]

From: Jan_Reinsch

Hey Luis, install the newest version of the MSAF, you can find it here: http://msaf.codeplex.com/releases/view/44716 Jan

Read the full discussion online.

To add a post to this discussion, reply to this email (msaf@discussions.codeplex.com)

To start a new discussion for this project, email msaf@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com