diff --git a/doc/json-config-parameters.md b/doc/json-config-parameters.md index 9cddd9d..7f872ea 100644 --- a/doc/json-config-parameters.md +++ b/doc/json-config-parameters.md @@ -446,6 +446,12 @@ Currently, only equirectangular dynamic content is supported. The panorama source is considered dynamic when this is set to `true`. Defaults to `false`. This should be set to `true` for video. +### `dynamicUpdate` (boolean) + +For dynamic content, viewer will start automatically updating when set to +`true`. Defaults to `false`. If the updates are controlled via the `setUpdate` +method, as with the Video.js plugin, this should be set to `false`. + ## Additional information for tour configuration files diff --git a/src/js/pannellum.js b/src/js/pannellum.js index f040a6e..077fa57 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -92,6 +92,7 @@ var defaultConfig = { northOffset: 0, showFullscreenCtrl: true, dynamic: false, + dynamicUpdate: false, doubleClickZoom: true, keyboardZoom: true, mouseZoom: true, @@ -2287,6 +2288,13 @@ function loadScene(sceneId, targetPitch, targetYaw, targetHfov, fadeDone) { } fireEvent('scenechange', sceneId); load(); + + // Properly handle switching to dynamic scenes + update = config.dynamicUpdate === true; + if (config.dynamic) { + panoImage = config.panorama; + onImageLoad(); + } } /**