Calling a external script with flashvars

According for documentation is correct, but it doesn’t work.
This is my full code:

        {
    	"plugins": {
    		"topBarContainer": {
    			"plugin": true
    		},
    		"controlBarContainer": {
    			"plugin": true,
    			"hover": false
    		},
    		"scrubber": {
    			"plugin": true
    		},
    		"largePlayBtn": {
    			"plugin": true
    		},
    		"playHead": {
    			"plugin": true
    		},
    		"playPauseBtn": {
    			"plugin": true
    		},
    		"volumeControl": {
    			"showSlider": true,
    			"layout": "horizontal",
    			"pinVolumeBar": false,
    			"accessibleControls": false,
    			"accessibleVolumeChange": 0.1,
    			"plugin": true
    		},
    		"durationLabel": {
    			"plugin": true
    		},
    		"currentTimeLabel": {
    			"plugin": true
    		},
    		"keyboardShortcuts": {
    			"volumePercentChange": "0.1",
    			"shortSeekTime": "5",
    			"longSeekTime": "10",
    			"volumeUpKey": "38",
    			"volumeDownKey": "40",
    			"togglePlaybackKey": "32",
    			"shortSeekBackKey": "37",
    			"shortSeekForwardKey": "39",
    			"openFullscreenKey": "70",
    			"closeFullscreenkey": "27",
    			"gotoBeginingKey": "36",
    			"gotoEndKey": "35",
    			"longSeekForwardKey": "ctrl+39",
    			"longSeekBackKey": "ctrl+37",
    			"percentageSeekKeys": "49,50,51,52,53,54,55,56,57",
    			"plugin": true
    		},
    		"liveCore": {
    			"plugin": true
    		},
    		"liveStatus": {
    			"plugin": true
    		},
    		"liveBackBtn": {
    			"plugin": true
    		},
    		"fullScreenBtn": {
    			"plugin": true
    		},
    		"playersJsReceiver": {
    			"plugin": true
    		}
    	},
    	"uiVars": [
    		{
    			"key": "autoPlay",
    			"value": true,
    			"overrideFlashvar": false
    		},
    		{
    			"key": "autoMute",
    			"value": false,
    			"overrideFlashvar": false
    		},
    		{
    			"key": "enableTooltips",
    			"value": true,
    			"overrideFlashvar": false
    		},
    		{
    			"key": "adsOnReplay",
    			"value": true,
    			"overrideFlashvar": false
    		},
    		{
    			"key": "EmbedPlayer.EnableMobileSkin",
    			"value": true,
    			"overrideFlashvar": false
    		}
    	],
    	"layout": {
    		"skin": "kdark"
    	},
    	"flashvars": {
    		"avatar": {
    			"plugin": true,
    			"iframeHTML5Js": "path/js/js.js"
    		}
    	}
    }

and my code from JS is very simple, is a just console.log.
I opened WEB CONSOLE, but don’t appear any error, but i think not working because the console.log don’t appear too.

Hi @matheusbzevedo,

Here is a very basic sample from my own local ENV that works correctly:

<script src="http://jessex/p/101/sp/10100/embedIframeJs/uiconf_id/23450314/partner_id/101"></script> 
<div id="kaltura_player_1515630699" style="width: 400px; height: 333px;"></div> 
<script> kWidget.embed({ 
    "targetId": "kaltura_player_1515630699", "wid": "_101", "uiconf_id": 23450314, 
    "flashvars": { 
        "streamerType": "auto",
            "avatar": {
                "plugin": true,
                "iframeHTML5Js": "1.js"
            }
    }, 
    "cache_st": 1515630699, "entry_id": "0_n8r7b39f" }); </script>

1.js just has:

console.log("Hello World");

Please replace the various IDs and base URL with your own and try it out. Should work just fine.
If it doesn’t, please post the full code here as well as your player’s version. This is assuming there is no embed page that’s publicly accessible I can look at. If there is one, then a link to it would be best.

1 Like

Thank you bro!
it works!

Glad to hear it:)

Happy videoing,

may you help me in another thing?

Sure. Feel free to post any question you may have.