Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Show Html Popup when Video Ends (Post Roll)

1 reply [Last post]

Hello,
Can you tell me whats the best solution for displaying an HTML customized popup when a specific video ends, something like the TIPJAR but not specific to PAYPAL.
Tks in advance
Pedro

You'll need to add a listener for the complete event, then do some JavaScript magic to create an position the HTML. The JavaScript to listen for the event would look something like:

var player;
function playerReady(obj) {
    player = document.getElementById(obj['id']);
    player.addModelListener('STATE', stateHandler);
};

function stateHandler(obj){
    if(obj.newstate == "COMPLETED"){
        var myText = INSERT_YOUR_HTML_HERE;
        player.innerHTML = myText;
    }
}

Hopefully that helps.