完成后关闭嵌入式演示播放器

问题描述 投票:0回答:1

首先我要说的是,我不是一个开发人员。我在数字银行工作,主要专注于SEO和营销。我已经将这个演示嵌入到我们的实时网站中进行培训,我希望在演示完成后它能自动关闭。下面是脚本。

function Function29(){  
$('#player').empty();
 Lemonade.DemoPlayer.play({
        demo: '750e8759-6fa1-45be-aa8a-03f02cbe45af',
        container: $('#player'),
        locale: 'en_US',
        finishButtonText: 'Continue',
        horizontalPadding: 25,
        onFinish: function() {
$("#player").html(
              "Click anywhere to continue"
            );
            // you can do anything when the game ends!
        },
        onStepChange: function (previousStep, currentStep, currentHotspot, totalSteps) {
            // every time the scene changes, this event is called
        },
    });
}

任何帮助将被感激。

javascript embedded javascript-framework
1个回答
0
投票

如果通过关闭,你的意思是,隐藏或删除播放器的容器,我假设这是 #player,

你可以直接拨打 $('#player').remove();

问题: 是否 $('#player').html('Click anywhere to continue'); 为你做什么?如果有,你可以运行 $('#player').remove()onFinish: function() {...} 你有。

你可以添加你的HTML脚本来显示更多细节吗?谢谢你!我将根据这个情况编辑我的回复。我会根据这个情况编辑我的回复。

© www.soinside.com 2019 - 2024. All rights reserved.