Get wid for video embed code

Hi
I’m implementing an aggregation of videos from Kaltura on the server in nodeJs. I get the videos for a specific category with the media.listAction and the corresponding MediaEntryFilter. I’m trying to get the wid for the embed code with the widget.listAction and the WidgetFilter.entryIdEqual set to the video.id. I get widgets back, but no combination of video.id and widget.id filed in the embed snipplet will work. How can I get the wid for a specific entryId and a uiconf_id, so I can calculate the embed code for this video.
Thanks for any help
Andi

Hello @andreasbader,

The wid param should always be set to _$PARTNER_ID. So, if your partner ID is 102, the wid param should be set to _102.

With regards to generating embed codes, you may find this project interesting:
https://kaltura.github.io/EmbedCodeGenerator/demo/

Cheers,

Hi Jess
The problem is the video is access restricted. We are able to generate an iframe embed code for a restricted video in Kaltura and this code works, but I dont get it runing for other videos. We can not cut and past the embed-code for all videos, I have to calculate the embed-Code on the server.

This is a working embed code for a restricted video and you can see, that the wid is not the _$PARTNER_ID

<iframe id="kaltura_player" src="https://cdnapisec.kaltura.com/p/2396981/sp/239698100/embedIframeJs/uiconf_id/42494131/partner_id/2396981?iframeembed=true&playerId=kaltura_player&entry_id=0_jt5kyhyh&flashvars[streamerType]=auto&amp;flashvars[localizationCode]=en&amp;flashvars[leadWithHTML5]=true&amp;flashvars[sideBarContainer.plugin]=true&amp;flashvars[sideBarContainer.position]=left&amp;flashvars[sideBarContainer.clickToClose]=true&amp;flashvars[chapters.plugin]=true&amp;flashvars[chapters.layout]=vertical&amp;flashvars[chapters.thumbnailRotator]=false&amp;flashvars[streamSelector.plugin]=true&amp;flashvars[EmbedPlayer.SpinnerTarget]=videoHolder&amp;flashvars[dualScreen.plugin]=true&amp;flashvars[Kaltura.addCrossoriginToIframe]=true&amp;&wid=1_5q4m17fi" width="400" height="285" allowfullscreen webkitallowfullscreen mozAllowFullScreen allow="autoplay *; fullscreen *; encrypted-media *" sandbox="allow-forms allow-same-origin allow-scripts allow-top-navigation allow-pointer-lock allow-popups allow-modals allow-orientation-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation" frameborder="0" title="Kaltura Player"></iframe>

Hi @andreasbader,

If content entitlement is enabled, you will need to pass a valid KS (Kaltura Session) in the embed code. Please see my response here: Disableentitlement vs read only role

Hi @jess

Thank you for this.

Is there no way to generate an iframe embed code like I have send in a previous post to integrate into a webpage when the user is allowed to see this video. This would be the easiest way to integrate the video in web and mobile and we could generate the iframe embed snipplet once on the server. Or is there a possibility to get the iframe embed code for an entryId with a KS from the Kaltura NodeJs API.

Thanks and best regards
Andi

Hello @andreasbader,

You can generate the KS (on the server side, using NodeJS or any of our supported clients) by calling session.start(). Needless to say that one should refrain from using JS on the client side for such operations since doing so would mean that anyone could easily obtain your partner secret by viewing the page’s source. Once generated, You can set the KS in the embed code.

If you’re using KMS (Kaltura MediaSpace), you may achieve the same goal by utilising certain KMS modules. KMS is proprietary software and is not available to community users. If you are a Kaltura customer, I suggest you approach your account manager. They will be able to advise you on the solution most suitable to your specific needs.