Ability to target "_parent" frame from a Camtasia Iframe

  • 2
  • Idea
  • Updated 1 month ago
  • (Edited)
Why is it not possible to target a "_parent" frame from a hotspot link? We want to embed a Camtasia video and target named anchors on the same page in which the Camtasia Iframe is located.  In fact we'd like to target multiple anchors but without then "_parent" target there is no alternative - either in the GUI or the XML code.
Photo of tom

tom

  • 1 Post
  • 0 Reply Likes

Posted 1 month ago

  • 2
Photo of Ben Rhodes

Ben Rhodes, Employee

  • 99 Posts
  • 32 Reply Likes
Hi Tom,
We do not support targeting "_parent" links because of security concerns and some embedding scenarios where the browser will prevent this.  Currently we limit hotspots links to absolute URL's that begin with `http://` or `https://`.

However, if you want to modify a production you can hack this in with a little JavaScript.
  1. Open the [production-name]_player.html file.
  2. Locate the following line of code:
    TSC.mediaPlayer.init("#tscVideoContent");
  3. If you add the following JavaScript after this line you listen to when a hotspot is clicked:
    var $smartPlayerContainer = $("#tscVideoContent");
    $smartPlayerContainer.on(TSC.events.Controls.HotspotClicked, function(event, data) {
    // all these values can be undefined unless setup for the hotspot.
    console.log(data.jumpFile);
    console.log(data.jumpTime);
    console.log(data.location);
    console.log(data.newWindow);
    // put code in to target parent page.
    });
You will need to come up with a way to map hotspot data to the url anchors you want to target in the parent page.

Sorry it isn't more directly supported at this point.
Ben