Skip to content

Commit

Permalink
add iframe check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzipi-kaltura committed Jun 24, 2024
1 parent 6946f0f commit ca51704
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit ca51704

Please sign in to comment.