使用 autoLoad 参数自动加载全景图
效果:
Auto load
代码:
OCTYPE HTML>
<html lang="ch">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author"content=“KaiSarH,huankai7@163.com”>
    <title>autoLoad</title>
    <link rel="stylesheet" href="pannellum.css"/>
    <script type="text/javascript" src="pannellum.js"></script>
    <style>
        #panorama {
            width: 1200px;
            height: 800px;
        }
    </style>
</head>
<body>
<div id="panorama"></div>
<script>
    pannellum.viewer('panorama', {
        "type": "equirectangular",
        "panorama": "test/test5.jpg",
        // 对autoLoad进行赋值,可以实现全景视频的自动播放
        "autoLoad": true
    });
</script>
</body>
</html>总结:
- 当我们设置了"autoLoad":true的时候,就不需要我们进行点击而可以直接自动播放全景图了










