Framework Linkage

Topics: Windows 8 JavaScript
Sep 17, 2012 at 4:48 PM

Sorry if this is a dumb question, but I'm new to the player framework and Win8 development in general.  I'm simply trying to get the MS player framework example (provided in the source).  It runs, but ads (which I'm trying to learn how to get running) don't function.

I get lots of RESOURCE_NOT_FOUND errors during compilation for Converters.js and probably everything below that (including the ads Javascript).

And of course, when it comes time to play an ad, the methods aren't defined in Javascript.

I'm using the latest player framework (preview 5) which is installed on a fresh machine so I know nothing is competing with it.

 

thanks!

Sep 17, 2012 at 5:23 PM

I guess I may have solved this by copying all of the Advertising JS I needed from the downloaded source zip you provide into my system Windows SDK folder.  Is this how it's supposed to work, or did I just kludge something?

thanks!

Developer
Sep 17, 2012 at 5:34 PM

There were some late changes made (when the Win8 RTM was released) to the way WinJS resources are loaded and how resource identifiers work. These were all fixed in MMPPF Preview 5, however, so I'm not sure why you are still getting resource errors assuming you are using the Win8 RTM and the latest version of MMPPF.

Please try removing all Player Framework references from your app, uninstalling anything to do with MMPPF from Tools -> Extensions and Updates, and then closing Visual Studio, reinstalling the latest version of MMPPF, and then re-adding the Player Framework references to your app.

If there is still errors after all that, please check what language you are running in Windows and in your app. Perhaps there is an issue if your app is not using the default en-US language.

Thanks!

Developer
Sep 17, 2012 at 5:41 PM
Edited Sep 17, 2012 at 5:42 PM
benfarrell wrote:

I guess I may have solved this by copying all of the Advertising JS I needed from the downloaded source zip you provide into my system Windows SDK folder.  Is this how it's supposed to work, or did I just kludge something?

thanks!

I think you might've kludged something :)

Here's what your references in default.html should look like if you are using the entire Player Framework, including advertising, adaptive streaming, and timed-text captions:

<!-- PlayerFramework references -->
<link href="/Microsoft.PlayerFramework.Js/css/PlayerFramework.css" rel="stylesheet" />
<link href="/Microsoft.PlayerFramework.Js.Advertising/css/PlayerFramework.Advertising.css" rel="stylesheet" />
<link href="/Microsoft.PlayerFramework.Js.TimedText/css/PlayerFramework.TimedText.css" rel="stylesheet" />
        
<script src="/Microsoft.PlayerFramework.Js/js/PlayerFramework.js"></script>
<script src="/Microsoft.PlayerFramework.Js.Advertising/js/PlayerFramework.Advertising.js"></script>
<script src="/Microsoft.PlayerFramework.Js.TimedText/js/PlayerFramework.TimedText.js"></script>
<script src="/Microsoft.PlayerFramework.Js.Adaptive/js/PlayerFramework.Adaptive.js"></script>

If you only care about advertising, then you can remove the link/script tags that refer to TimedText or Adaptive.

Sep 17, 2012 at 7:50 PM

Thanks!  I just don't know what's happening here - I uninstalled and reinstalled like you suggested, but I'm still having the same issue.

The default.html reference do look exactly as you suggest because I'm not changing the sample/example source for the player framework sample project.  What I end up doing when I get into the project is first change the "Any CPU" option to x64 so my smooth streaming libraries work.  And then, I take all the MMPPF references and get rid of them, as they are pointing to my desktop (where I've unzipped the sample source) and I get a not found message for every one.  After removing them, I re-add the ones I need (including advertising) from the extensions menu in the reference manager.

Everything seems to work, until I get a runtime exception as it's trying to create the ad on the programmatic ad example (the one module I'm hitting).  Kludging as I did above seems to be the only way I can get it to work.  I don't see any of the referenced JS files in the SDKs folder - but I'm not sure if I'm supposed to, or if its all compiled in somewhere.

And yes, I believe I'm running the Win RTM.  I had some other problems, didn't have MSDN, so I saw that the easiest way to get through this was to grab the Win 8 Enterprise trial.  I got that setup on a fresh machine this morning.