S.Raaj Nishanth
S.Raaj Nishanth

Reputation: 242

How to re-size the Strobe media player dynamically?

I'm using the Strobe media player (with OSMF). I need to re-size the player when someone clicks a re-size button (built into the player). How can i do this? I've searched high and low but found no results.

Upvotes: 1

Views: 510

Answers (1)

peter
peter

Reputation: 2103

Set scaleMode to "letterbox", then the player automatically adjusts its size depending on its parent div. You can then change its size, for example using jquery:

function getHeight() { return $(window).height(); };

function getWidth() { return $(window).width(); };

$(window).resize(function () {
    $("#strobemediaplayback").css({ height: getHeight(), width: getWidth() });
});

Upvotes: 2

Related Questions