Cognos Analytics

 View Only
  • 1.  Auto Play Story

    Posted Tue July 20, 2021 01:24 PM
    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


  • 2.  RE: Auto Play Story

    Posted Wed July 21, 2021 03:58 AM
    Hi Jeremy, 

    I don't think there is any way to do that. But I agree this would help a lot especially when we project stories to TVs. If there is an idea/enhancement that is already created, I would like to vote for it as well. 

    Regards,

    ------------------------------
    Kiran Passumarthi
    www.linkedin.com/in/kiranpassumarthi
    ------------------------------



  • 3.  RE: Auto Play Story

    Posted Wed July 21, 2021 04:05 AM
    Here is the idea entry I found . 
    https://ibm-data-and-ai.ideas.aha.io/ideas/CA-I-2780

    Regards,

    ------------------------------
    Kiran Passumarthi
    www.linkedin.com/in/kiranpassumarthi
    ------------------------------



  • 4.  RE: Auto Play Story

    Posted Wed July 21, 2021 01:20 PM
    Thanks Kiran - that's the idea I submitted. :)

    ------------------------------
    Jeremy Aude
    ------------------------------



  • 5.  RE: Auto Play Story

    IBM Champion
    Posted Wed July 21, 2021 06:57 AM
    Hi @Jeremy Aude

    here 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&amp;pathRef=XSSSTART.my_5ffolders%2FNew%2BstoryXSSEND&amp;closeWindowOnLastView=true&amp;ui_appbar=false&amp;ui_navbar=false&amp;shareMode=XSSSTARTembeddedXSSEND&amp;action=XSSSTARTviewXSSEND&amp;sceneId=XSSSTARTmodel0000017ac88c9791_5f00000000XSSEND&amp;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/
    ------------------------------