Adding Kaltura cue point issue

I am working on a requirement to play video/images uploaded in kmc as mid-roll ads in other video uploaded in kmc. I am following the steps given in Kaltura

  • Click “Add” on the timeline below.
  • (Required) Select ad type (video/overlay)
  • (Optional) Enter provider name (VAST, Freewheel, or Other) & optional values. E.g., for VAST enter TagURL, for other providers
  • enter values that you want to pass to the player. Note that the player needs to be ad enabled.
  • (Optional) Enter cue point name

I am adding custom type of Ad (type = Other). I feel there is a problem with URL field. I am adding kaltua URL of video from kmc which I need to play in between as ad.

Hi,
You can’t set a midroll pointing directly to a Kaltura entry ID or video URL. This can be done only for preroll and postroll using the bumper plugin.
If you must support midroll, there are 2 options:

  1. Use VAST and create your own simple VAST file pointing to the required video file. Host the VAST file on youe server and set its URL link in the VAST cue point definition.
  2. Use the “other” provider, enter the entry ID in the name field and use Kaltura API to listen to the cue point event, retrieve the entry ID, change media to the new entry and handle the content restore procedure yourself. This solution is not advised unless you are very familiar with the Kaltura player API and Javascript. The first option is the simplest one and should give best results.

Hi Amir,
Can you please provide a few more details on the first option for inserting cue points, the one with the on prem hosted VAST file.

Regards,
Jacob R

Hi Jacob,
Take a look at this demo page: http://player.kaltura.com/modules/KalturaSupport/tests/AdPodsVast3.html
You can see the player VAST plugin is configured to load this locally hosted VAST XML file: http://projects.kaltura.com/MichalR/vast3_demo.xml
This specific VAST file specifies 2 prerolls and an overlay at time offset 20 seconds.
Using the same setup, you need to define the midroll in your VAST file ( I don’t have a sample for midroll I can provide). VAST definitions specs can be found on the IAB web site: https://www.iab.com/guidelines/digital-video-ad-serving-template-vast-3-0/
For best compatibility with Kaltura, use VAST 3 and not VAST 4.

Hope that helps,
Amir

Hello,
Thanks for all the info Amir, I didn’t get to try your solution but will do so on the next days and will let you know how it goes, again thanks for taking the time to answer.

Regards,
Jacob R.

Hi Amir,
I’ve done as you instructed and i’m working with the VAST add provided by you http://projects.kaltura.com/MichalR/vast3_demo.xml, but the cue points are loaded in the KMC, it works in preview and embedd but when i use the code and embedd on a webserver, it doesn’t load the cue points, for example:
http://31.14.40.116/k.html

Hi @razvan_iacob,

If you open your browser’s dev tools and look under “Console” when loading that embed page, you’ll see:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://projects.kaltura.com/MichalR/vast3_demo.xml. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

I believe Amir meant for you to take that XML as an example and create a similar one on your machine, not use it directly.

Hi Jess,
The problem is not only with VAST players, I have the same thing with cue points, I add cue points, they work in KMC but on a external page they do not.
For example http://www.thg-network.com/test-vid.html. the specific video embedded in this player does work with the cuepoints in kmc but as you can see in the embedded page doesn’t work.

Thanks,
Jacob

Hi @razvan_iacob,

What does the UI conf for this player look like?
The ID I see is 23448237, you can get the JSON by calling:

uiconf->get(23448237);

The relevant parts are the config and uiVars JSON blocks.
Also, what happens when you open the tiny URL from KMC->Content->Your Entry->Preview and embed? Does it work from there?
Can you share a dynamic embed instead? would be easier to debug.

Hi Jess, and thanks for the response.
This the config Json block:

“config”:"{
\n\t"plugins": {
\n\t\t"topBarContainer": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"controlBarContainer": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"scrubber": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"largePlayBtn": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"playHead": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"playPauseBtn": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"volumeControl": {
\n\t\t\t"showSlider": true,\n\t\t\t"layout": “horizontal”,\n\t\t\t"pinVolumeBar": false,\n\t\t\t"accessibleControls": false,\n\t\t\t"accessibleVolumeChange": 0.1,\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"durationLabel": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"currentTimeLabel": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"keyboardShortcuts": {
\n\t\t\t"volumePercentChange": “0.1”,\n\t\t\t"shortSeekTime": “5”,\n\t\t\t"longSeekTime": “10”,\n\t\t\t"volumeUpKey": “38”,\n\t\t\t"volumeDownKey": “40”,\n\t\t\t"togglePlaybackKey": “32”,\n\t\t\t"shortSeekBackKey": “37”,\n\t\t\t"shortSeekForwardKey": “39”,\n\t\t\t"openFullscreenKey": “70”,\n\t\t\t"closeFullscreenkey": “27”,\n\t\t\t"gotoBeginingKey": “36”,\n\t\t\t"gotoEndKey": “35”,\n\t\t\t"longSeekForwardKey": “ctrl+39”,\n\t\t\t"longSeekBackKey": “ctrl+37”,\n\t\t\t"percentageSeekKeys": “49,
50,
51,
52,
53,
54,
55,
56,
57”,\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"liveCore": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"liveStatus": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"liveBackBtn": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"fullScreenBtn": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"playersJsReceiver": {
\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"loadingSpinner": {
\n\t\t\t"imageUrl": “”,\n\t\t\t"lines": 10,\n\t\t\t"lineLength": 10,\n\t\t\t"width": 6,\n\t\t\t"radius": 12,\n\t\t\t"corners": 1,\n\t\t\t"rotate": 0,\n\t\t\t"direction": 1,\n\t\t\t"color": “rgb(0,
154,
218)|rgb(255,
221,
79)|rgb(0,
168,
134)|rgb(233,
44,
46)|rgb(181,
211,
52)|rgb(252,
237,
0)|rgb(0,
180,
209)|rgb(117,
192,
68)|rgb(232,
44,
46)|rgb(250,
166,
26)|rgb(0,
154,
218)|rgb(232,
44,
46)|rgb(255,
221,
79)|rgb(117,
192,
68)|rgb(232,
44,
46)”,\n\t\t\t"speed": 1.6,\n\t\t\t"trail": 100,\n\t\t\t"shadow": false,\n\t\t\t"className": “spinner”,\n\t\t\t"zIndex": 2000000000,\n\t\t\t"top": “auto”,\n\t\t\t"left": “auto”,\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"vast": {
\n\t\t\t"storeSession": false,\n\t\t\t"pauseAdOnClick": true,\n\t\t\t"enableCORS": true,\n\t\t\t"loadAdsOnPlay": true,\n\t\t\t"numPreroll": 1,\n\t\t\t"prerollStartWith": 0,\n\t\t\t"prerollInterval": 0,\n\t\t\t"preSequence": 0,\n\t\t\t"overlayStartAt": 5,\n\t\t\t"overlayInterval": 300,\n\t\t\t"timeout": 5,\n\t\t\t"numPostroll": 1,\n\t\t\t"postrollStartWith": 0,\n\t\t\t"postrollInterval": 0,\n\t\t\t"postSequence": 0,\n\t\t\t"htmlCompanions": “Comp_300x250:300:250;Comp_728x90:728:90”,\n\t\t\t"plugin": true,\n\t\t\t"trackCuePoints": true\n\t\t
},
\n\t\t"sourceSelector": {
\n\t\t\t"switchOnResize": true,\n\t\t\t"simpleFormat": true,\n\t\t\t"displayMode": “size”,\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"theme": {
\n\t\t\t"applyToLargePlayButton": true,\n\t\t\t"buttonsSize": 12,\n\t\t\t"buttonsColor": “#000000”,\n\t\t\t"buttonsIconColor": “rgb(255,
255,
255)”,\n\t\t\t"sliderColor": “#333333”,\n\t\t\t"scrubberColor": “#ffffff”,\n\t\t\t"controlsBkgColor": “#000000”,\n\t\t\t"watchedSliderColor": “rgb(212,
152,
65)”,\n\t\t\t"bufferedSliderColor": “#AFAFAF”,\n\t\t\t"timeLabelColor": “rgb(255,
255,
255)”,\n\t\t\t"buttonsIconColorDropShadow": true,\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"noticeMessage": {
\n\t\t\t"text": “Ad: {
sequenceProxy.timeRemaining
}
secs”,\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"skipNotice": {
\n\t\t\t"text": “skip ad in {
sequenceProxy.skipOffsetRemaining
}
seconds”,\n\t\t\t"plugin": true\n\t\t
},
\n\t\t"skipBtn": {
\n\t\t\t"label": “Skip Ad”,\n\t\t\t"skipOffset": “20”,\n\t\t\t"plugin": true\n\t\t
}
\n\t

And this is the uiVars block:

“uiVars”: [
\n\t\t{
\n\t\t\t"key": “autoPlay”,\n\t\t\t"value": true,\n\t\t\t"overrideFlashvar": false\n\t\t
},
\n\t\t{
\n\t\t\t"key": “autoMute”,\n\t\t\t"value": false,\n\t\t\t"overrideFlashvar": false\n\t\t
},
\n\t\t{
\n\t\t\t"key": “enableTooltips”,\n\t\t\t"value": true,\n\t\t\t"overrideFlashvar": false\n\t\t
},
\n\t\t{
\n\t\t\t"key": “adsOnReplay”,\n\t\t\t"value": true,\n\t\t\t"overrideFlashvar": false\n\t\t
},
\n\t\t{
\n\t\t\t"key": “Kaltura.UseAppleAdaptive”,\n\t\t\t"value": false,\n\t\t\t"overrideFlashvar": false\n\t\t
}
\n\t
],
\n\t"layout": {
\n\t\t"skin": “kdark”\n\t
}
\n
}
",
“useCdn”:1,
“tags”:“html5studio,player”,
“swfUrlVersion”:“3.9.9”,
“createdAt”:1473761193,
“updatedAt”:1490796431,
“creationMode”:2,
“html5Url”:"/html5/html5lib/v2.52/mwEmbedLoader.php",
“version”:“222”,
“objectType”:“KalturaUiConf”
}

Regarding the Tiny Url it doesn’t work there either:
#portal.servcast.net/index.php/extwidget/preview/partner_id/101/uiconf_id/23448237/entry_id/0_eaj3ptz3/embed/dynamic?&flashvars[streamerType]=auto

External Dynamic Embedd: http://31.14.40.116/k.html

Many thanks,
Jacob.

Hi @razvan_iacob,

I believe your issue is your embed does not include a KS [Kaltura Session]. That is needed in order to get the cuepoints from the API.
When you play under KMC you DO have a KS [with way more privileges than is required for this since that KS is used to admin the partner].
Please add: ““ks”:“valid_KS_HERE”” to “flashvars” array in your embed code and try again.

Note that the KS should only have [privileges] => view:*, no additional privileges should be required.

Also note that if your cuepoints have a userId set, the KS should also have the same userId.
To get all the cuepoints for a give entry you can call:
cuepoint->list() with the following filter:
filter:objectType=KalturaCuePointFilter
filter:entryIdEqual=$YOUR_ENTRY_ID

This can be done with a simple script or directly from Admin Console->Developer->Test Console

Dear Jess,
I managed to add the ks to the embedded code, but I have the same result.

31.14.40.116/k.html

P.S: Managed to get them working, indeed i needed an admin KS.
Thank you Jess.

Regards,
Jacob R.

Welcome @razvan_iacob. Are we all good now? Also, again, when using a KS for that, make sure it only has the bare minimum amount of privileges, you shouldn’t need more than view privileges to get the cuePoints.

Hello Jess,
Yes seems everything is alright, alto i’ve been informed the cue points do not load on mobile devices, but i’ll look into that. The important thing is VAST and cue points are working correctly on website embedded codes. I really appreciate the support and advices you gave me.

Regards,
Jacob R

Most welcome, Jacob.

Happy videoing,