How to Autostart a presentation?

Integration questions/issues
Post Reply
Marook
Posts: 2
Joined: Sat Jun 01, 2019 1:41 pm

How to Autostart a presentation?

Post by Marook » Sat Jun 01, 2019 1:52 pm

Hi @ all,

i am trying to integrate OnlyOffice into my own small CRM/ERP system. So now i need some further help, because i could not find any relative information about my problem.
I want to open an existing pptx-file stored in a server and start the presentation right up after start without any user interaction. Here is the (test) code i am using:

Code: Select all

<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="utf-8"/>
    <style type="text/css">
        html, body { 
            margin: 0;
            height: 100%;
        }
        iframe { 
            box-sizing: border-box;   /* make the border size be included in the height */
            display: block; 
            width: calc(100%);
            height: calc(100%);
        }
    </style>
</head>
<body>
    <div id="placeholder"></div>
    <script type="text/javascript" src="https://public-hostname-of-my-document-server/ds-vpath/web-apps/apps/api/documents/api.js"></script>

    <script>
        config = {
            type: "desktop",
            width: '100%',
            height: '100%',
            documentType: 'presentation',
            document: {
                title: "test.pptx",
                url: "https://dl.someservers.com/test.pptx",
                fileType: "pptx",
                key: "",
                vkey: ""
            },
            editorConfig: {
                customerId: '',
                autostart: 'player',
                mode: 'view',
                embedded: {
                    embedUrl: '',
                },
            },
            events: {
                onDocumentReady: function(){
                    console.log('Document loaded...');
                    $('#status-btn-preview').click();	//this does not work....
                    $('#preview-controls-panel').hide();  //this does not work as well...
                }
            }
        };

        var docEditor = new DocsAPI.DocEditor("placeholder", config);

    </script>
</body>
</html>
First i thought, i could use

Code: Select all

editorConfig.autostart
but it does not work, later i tried some jquery tricks like simulating a click on the "Play" button, but this also does not work.

Any ideas ?

Maxim
Posts: 1904
Joined: Tue Oct 11, 2016 2:34 pm

Re: How to Autostart a presentation?

Post by Maxim » Mon Jun 03, 2019 10:53 am

Hello Marook!
Unfortunatelly there is no way to start the presentation right up after start without any user interaction.

Marook
Posts: 2
Joined: Sat Jun 01, 2019 1:41 pm

Re: How to Autostart a presentation?

Post by Marook » Mon Jun 03, 2019 3:25 pm

Thx for your reply, but that's not what i wanted to read :)

Is this because of a browser limitation or is it a OO-design-issue ? I am using a self-compiled browser based on chromium-engine and i already had to adjust some parameters in order to autostart a youtube-video in fullscreen w/o any user interaction. But if there is no way because OO wasn't developed in this direction, i have to find another solution.

Greetings Marook

Maxim
Posts: 1904
Joined: Tue Oct 11, 2016 2:34 pm

Re: How to Autostart a presentation?

Post by Maxim » Tue Jun 04, 2019 10:08 am

Hello!
It is a OO-design-issue

Post Reply