Loading external pages and scripts

Loading external pages and scripts
In the recent server release, a new API was added to the SDK for loading and scaling external pages and scripts. Applications for this include navigation, scaling, and launching external pages or web content (e.g. Flash).

Here's the code... ENJOY!
// load a standard HTML page from uri with no view constraints connected.loadPage("http://google.com/", connected.PT_HTML, null); // load a standard HTML page from uri with resolution constraints var viewConstraints = connected.createViewConstraintSet(); viewConstraints.addResolutionConstraint(800, 600); connected.loadPage("http://google.com/", connected.PT_HTML, viewConstraints); // load a Connected DCTK page from uri with constraints for both resolution and aspect ratio var viewConstraints = connected.createViewConstraintSet(); viewConstraints.addResolutionConstraint(640, 480); viewConstraints.addResolutionConstraint(1280, 720); viewConstraints.addAspectRatioConstraint(4, 3); connected.loadPage("http://somewhere.com/somefile.js", connected.PT_DCTK, viewConstraints);


Future code for 1.4

Right now, this is what we're looking at for server 1.4:

var params = connected.createPageDescriptor();
params.uri = "http://somewhere.com/someflash.html";
params.pageType = dcIConnected.PT_HTML;
params.viewConstraints.addAspectRatioConstraint(16, 9);
params.audioCapture = true;
params.htmlInputFocusMode = dcIPageDescriptor.FOCUS_MODE_OBJECT;
connected.loadFromPageDescriptor(params);

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Connected Plug-ins

License Agreement

NO COMMERCIAL USE: This License Agreement grants our community members the right to use the Software downloaded from DivX Labs for personal use only in order to evaluate and provide feedback about it to DivX, Inc. Commercial use of the Software or of the work products resulting from its use is not permitted under the Terms of Use of DivX Labs.

"