Hi
@Jeremy Audehere is some q-a-d code I just did to hit the play button once the story is loaded:
<html>
<head>
<title>Story test</title>
</head>
<body>
<iframe height="100%" width="100%"
allow="autoplay"
src="/crn1/bi/?perspective=XSSSTARTstoryXSSEND&pathRef=XSSSTART.my_5ffolders%2FNew%2BstoryXSSEND&closeWindowOnLastView=true&ui_appbar=false&ui_navbar=false&shareMode=XSSSTARTembeddedXSSEND&action=XSSSTARTviewXSSEND&sceneId=XSSSTARTmodel0000017ac88c9791_5f00000000XSSEND&sceneTime=5000" width="320" height="200" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen=""></iframe>
<script>
function clickPlay() {
try {
document.querySelector("iframe").contentWindow.document.querySelectorAll("button")[11].click()
} catch {
console.log("AMVARA: Content not ready - waiting 1s")
return
}
console.log("AMVARA: clear Intervall")
clearInterval(AMVARA_interval)
}
console.log("AMVARA: loading story with autoplay")
// click on play button
var AMVARA_interval=setInterval( clickPlay , 100);
</script>
</body>
</html>
You should copy the above html into a file and put that on the same webserver where cognos is running in order to avoid CROSS-Domain errors.
The embeded iFrame link was copied from Cognos Portal "share button" on the story.
Hope this helps.
Ralf
------------------------------
Ralf Roeber
https://linkedin.com/in/ralf-roeber-470425a/------------------------------
Original Message:
Sent: Tue July 20, 2021 01:23 PM
From: Jeremy Aude
Subject: Auto Play Story
Hello,
Wondering if anyone knows of a way we can have a Story plan upon opening? Perhaps a property that could be passed in the URL? I don't see any documented instructions but maybe someone has found a way to achieve this?
This is for version 1.2.
Thanks,
Jeremy
------------------------------
Jeremy Aude
------------------------------
#CognosAnalyticswithWatson