Viewer API not working in Edge?


(Submarine Channel) #1

Hi all,

Seems I have an issue making the Viewer API work in Edge (14). I am checking on browserstack, the problem is illustrated here:

The loading just.. stops. Works fine in Firefox, Chrome and Safari. Maybe I'm doing something wrong? My code boils down to the code below. No errors in the console, can't figure out what's going on there. Anyone any idea?

Kind regards, Karel

        var iframe = document.getElementById("sketch");
        var version = "1.0.0";
        var client = new Sketchfab( version, iframe);
        var urlId = "237f6b98230e4f5abbbd1674b6b513fb";

        var viewer = null;

        client.init( urlId,{
            success: onFabSuccess, 
            error: (error)=>{
                console.log("sketchfab error:");
            //autospin: 0.05,
            autostart: 1,
            camera: 1,
            ui_stop: 0,
            ui_controls: 0,
            ui_settings: 0,
            ui_help: 0
        } );

        function onFabSuccess(api){
            viewer = api;

(Moroplogo) #2

Your code works well on Internet Explorer11.
Try with the sketchfab-viewer-1.0.1.js version like mentionned on this comment :

(Submarine Channel) #3

Usin that one already. Explicitely calling 'start()' onSuccess seems to do the trick for me :slight_smile:

(Rémy Bouquet) #4

for some reason the autostart parameter seems to not work on edge. I'm going to investigate but as a workaround you can remove the autostart param in the init options and call api.start() in your onFabSuccess function.

Also the loading gauge never fills up in Edge for some reason. I'm going to look into this too.
Thanks for reporting.

(Submarine Channel) #5

Thanks for the confirmation