[SOLVED] How to get embedType in external plugin

Hi i want to get information which embed type is use on the player ([‘auto’, ‘dynamic’, ‘thumb’, ‘iframe’, ‘legacy’])

how can i get it in my newly created html5 plugin?
In plugin I have access to mw and embedPlayer property but can not find it there


Please see https://knowledge.kaltura.com/embedding-kaltura-media-players-your-site for an explanation about the different embed options.

I know what are the differences between them but I want to know which one is currently in use in the running player.
How can I check it from the code?

We do not keep the embed type as a player property or variable you can test.
Thumbnail embed cannot be detected as the player is not loaded when you see the thumbnail. Once you click it - the player loads using auto embed.
You can try and differentiate between iframe embed and other embed types by looking for specific class names. For example the class name “kWidgetIframeContainer” is not used in iframe embed but is used on the player div in all other embed types.
Why do you need to detect the embed type?


well i want to detect it because in new 2.34 version of HTML5 player when use thumbnail embed and press play it is not playing LIVE stream - it works for VOD. So I was thinking to make check in mw.EmbedPlayerKplayer.js class

in case if embedType == ‘thumb’ and isLive and there is no cancel live autoplay set autoplay to true

it fix the issue.

Well, if you have access to the code, you can add the following to kwidget.js around line 560, after defining the settings.flashvars object:
settings.flashvars[“embedType”] = “thumb”;

and then in line 137 of mw.EmbedPlayerKPlayer.js you can check for it: _this.getFlashvars().embedType

thanks it was exactly what i needed