Quantcast
Channel: Kaltura - Latest posts
Viewing all articles
Browse latest Browse all 7410

Unable to get player.js (iframe embed) to play

$
0
0

I’m still trying to figure this out…

I think I need to use postMessage to communicate with the iframe.

I found the playerjs spec doc which suggests the following should do the trick:

document.querySelector('iframe').contentWindow.postMessage(
  JSON.stringify({
    context: 'player.js',
    version: 'version',
    method: 'play'
  })
);

However, when I use this, I get a TypeError: Not enough arguments error.

Any ideas on what I’m doing wrong?


Viewing all articles
Browse latest Browse all 7410

Trending Articles