So, I’ve got another project (a few actually) that will be integrating thePlatform’s video player. I’m slowly but surely getting a grip on how to use this player but I admit, it’s not the easiest API to work with. I guess my biggest gripe is how I want to so badly just load an instance of the PDK player and just call something like player.loadPID(videoPID,true) with the second arg being a start on load boolean and if false, show the video thumbnail. Just having a player.stop() so I can directly just stop a video would be nice. Instead you need to go into the player component, to the controller, then HOPE and PRAY the function or property you’re looking for is there….[/vent]

/**************** Put on AS3 Code Speak hat *********************/

That being said, here’s a tip: Create a class that extends the PDKContainer: example:

public class your_videoPlayer extends PdkContainer
//add whatever props you need here
public var _pdkPlayer:Player;

public function your_videoPlayer()

{ super(“your_videoPlayer”,0,true); //the true parameter is a ‘wait for stage’ boolean which without it, will cause the container to think it’s the only class being loaded and probably give you null values when it tries to access the stage

//Do everything else you would normally and assign the player to the _pdkPlayer class propert

//Ok, that being said, in your class that creates this “your_videoPlayer” instance example:

var yourVideoPlayer:your_VideoPlayer = new your_VideoPlayer();

// I just created a thumbnail loader (Thanks again casalib!) that would load the thumbnail for the video and on press calls


/**************** Take off AS3 code hat – Put on Nerd Speak Hat *********************/

with the releaseURL being the targeted releaseURL you have for the video you want to play and the true boolean being start the video on loading.

I couldn’t find an easier way to get the player to behave with loading the video thumbnail consistently, having consistent control over the player. I have yet to figure out how to get ads to load properly but will post the solution to that if I can (in talks with thePlatform’s support team now).

Hopefully this helped someone out there in internet-land that is a flash dev working with compiling the thePlatform’s PDK.