Console Error with iframe


I’m getting a console error from the Kaltura JS file and it looks like ‘iframe.contentWindow’ is null and it’s trying to define a variable with ‘iframe.contentWindow.document’ so it just throws an error. This seems to happen after the kWidget.embed function.

Any ideas as to why this error might be happening?

Hello,

Please share the full embed code as well as the requests you see being made when loading the page.

1 Like
kWidget.embed({
        'targetId': 'videoContainer',
        'wid': '_0000000',
        'uiconf_id': '00000000',
        'entry_id': videoFilePath,
        'readyCallback': function (playerId) {
            kdp = document.getElementById(playerId);
            kdp.kBind("closeFullScreen", function () {
                if (navigator.userAgent.match(/(iPod|iPhone)/)) {
                    kdp.sendNotification("doSeek", 30);
                }
                else {
                    kdp.sendNotification('doPause');
                }
            });
            kdp.kBind("doPlay", function () {
                var $iframe = $("#videoContainer_ifp").contents();
                var vidContainer = $iframe.find('#pid_videoContainer');
                vidContainer.bind("webkitendfullscreen", function () {
                    $(".spinner").css("display", "none");
                    kdp.sendNotification('doStop');
                });
            });
            kdp.kBind("playerPlayEnd", function () {
                kdp.sendNotification('closeFullScreen');
            });
        }
    });

@jess Do you have any ideas?