Errors when adding SMFPlayer Control to ReaderPage in latest Alpha

Jan 9, 2012 at 3:23 PM

In previous releases of Social Viewer Template, I have had success using an in-app playback method for play Youtube video content without needing to call the Youtube application.

To do this I used the Microsoft Media Platform from http://smf.codeplex.com/

Specifically, I modified the Video Item Template in the Reader page to create an instance of the <Core:SMFPlayer/> Control then add some logic in the code-behind to populate the player and play the video.  The end result is really neat in-app video playback.  You can see this in my app:  http://www.windowsphone.com/en-US/apps/e3182034-7237-4f97-a741-2aa52b5f2e1c

Oddly, this is not working in the current alpha release.  Whittling down my changes, I found the error occurs simply when creating an instance of the <Core:SMFPlayer/> Control

It is important to note that I have verified that the SMFPlayer control works in another 7.1 Phone project that I have coded from scratch.

I find I am unable to playback videos using the same method leveraged in a previous release of Social Viewer.  When I load a view which has the SMFPlayer Control in it (In debug mode), I get an error stating that ServiceReferences.ClientConfig can not be found.  This is very strange, because I am not using any WCF services.

I don't expect too much help here, as this is definitely a fringe issue, but if anyone could shed some light on what might be going on it would be much appreciated.  My hunch is that this has to do with updates to the way the layout is controlled.

-Paul

Coordinator
Jan 9, 2012 at 7:21 PM

As weird as this sounds, this error can be resolved by removing the reference to BuiltToRoam.GeoWatcher.dll. This reference was added so incorporate location into the social viewer. However, it hasn’t been wired up yet and requires a ClientConfig file to resolve the Bing web services. Unfortunately the SMF player was reflecting over all referenced assemblies which was invoking a static constructor. Hope this helps!

Nick Randolph | Built to Roam Pty Ltd | Microsoft MVP – Windows Phone Development | +61 412 413 425 | @btroam
The information contained in this email is confidential. If you are not the intended recipient, you may not disclose or use the information in this email in any way. Built to Roam Pty Ltd does not guarantee the integrity of any emails or attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Built to Roam Pty Ltd.

From: toolboc [email removed]
Sent: Tuesday, 10 January 2012 3:24 AM
To: Nick Randolph
Subject: Errors when adding SMFPlayer Control to ReaderPage in latest Alpha [socialviewer:285488]

From: toolboc

In previous releases of Social Viewer Template, I have had success using an in-app playback method for play Youtube video content without needing to call the Youtube application.

To do this I used the Microsoft Media Platform from http://smf.codeplex.com/

Specifically, I modified the Video Item Template in the Reader page to create an instance of the <Core:SMFPlayer/> Control then add some logic in the code-behind to populate the player and play the video. The end result is really neat in-app video playback. You can see this in my app: http://www.windowsphone.com/en-US/apps/e3182034-7237-4f97-a741-2aa52b5f2e1c

Oddly, this is not working in the current alpha release. Whittling down my changes, I found the error occurs simply when creating an instance of the <Core:SMFPlayer/> Control

It is important to note that I have verified that the SMFPlayer control works in another 7.1 Phone project that I have coded from scratch.

I find I am unable to playback videos using the same method leveraged in a previous release of Social Viewer. When I load a view which has the SMFPlayer Control in it (In debug mode), I get an error stating that ServiceReferences.ClientConfig can not be found. This is very strange, because I am not using any WCF services.

I don't expect too much help here, as this is definitely a fringe issue, but if anyone could shed some light on what might be going on it would be much appreciated. My hunch is that this has to do with updates to the way the layout is controlled.

-Paul

Jan 11, 2012 at 10:24 PM

@Nick,

That did the trick, thanks again!

-Paul