diff --git a/src/player.ts b/src/player.ts index a4744e5b..af42bea7 100644 --- a/src/player.ts +++ b/src/player.ts @@ -2013,13 +2013,15 @@ export default class Player extends FakeEventTarget { * @private */ private _addTitleOnIframe(): void { - const head = Utils.Dom.getElementBySelector('head'); - let title = head.querySelector('title'); - if (!title){ - title = Utils.Dom.createElement('title'); - head.appendChild(title); + if (window.self !== window.top) { + const head = Utils.Dom.getElementBySelector('head'); + let title = head.querySelector('title'); + if (!title){ + title = Utils.Dom.createElement('title'); + head.appendChild(title); + } + title.innerHTML = this._sources.metadata.name; } - title.innerHTML = this._sources.metadata.name; } /**