Iframe target element is not an instance of HTMLElement causing 'no element found' error
In the most recent version player-v8.16.1 (and master) there is an issue when initializing the player with an element that is in an iframe. The dom.js:66 checks that the something instanceof HTMLElement however if the target element is from an iframe something will be of type HTMLElement of the iframes window and not the callers window.
I have resolved this issue in the past by doing something that would result in some code that looks like this:
if (!!something.ownerDocument && something instanceof something.ownerDocument.defaultView.HTMLElement) {...
Can you provide a simple HTML part of this setup? Not sure if I understood the problem or the right setup for this issue.
I have the same issue. Here is a rough view of what's going on. The JS can access the player code using
top.window.bitmovin
but it fails to recognize the container provided
<!-- BASE DOCUMENT -->
<script src="bitmoving-player.js"></script>
<script src="bitmoving-player-ui.js"></script
<iframe src="applications-wrapper">
<div class="applications-list">
<iframe src="application-01"></iframe>
<iframe src="application-02"></iframe>
<iframe src="application-03">
<div id="player-target"><!-- WANT TO RENDER PLAYER HERE --></div>
</iframe>
<iframe src="application-04"></iframe>
</div>
</iframe>