changeset 1661:e4589378ad8b

warning message about unsupported videos
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 19 Nov 2020 10:29:33 +0100
parents 05b55b89a134
children 0f161841f837
files Applications/StoneWebViewer/WebApplication/app.js Applications/StoneWebViewer/WebApplication/index.html Applications/StoneWebViewer/WebApplication/pdf-viewer.js
diffstat 3 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Thu Nov 19 10:21:20 2020 +0100
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Thu Nov 19 10:29:33 2020 +0100
@@ -89,8 +89,8 @@
         }
       }
       else if (newVal.type == stone.ThumbnailType.VIDEO) {
-        // TODO
-        console.warn('Videos are not supported yet by the Stone Web viewer');
+        this.status = 'video';
+        console.warn('Videos are not supported by the Stone Web viewer yet');
       }
     }
   },
--- a/Applications/StoneWebViewer/WebApplication/index.html	Thu Nov 19 10:21:20 2020 +0100
+++ b/Applications/StoneWebViewer/WebApplication/index.html	Thu Nov 19 10:29:33 2020 +0100
@@ -592,11 +592,12 @@
               <pdf-viewer v-bind:prefix="canvasId + '-pdf'" ref="pdfViewer"></pdf-viewer>
             </div>
                 
-            <!--div v-if="status == 'video'" class="wvPaneOverlay">
-              <video class="wvVideo" autoplay="" loop="" controls="" preload="auto" type="video/mp4"
+            <div v-if="status == 'video'" class="wvPaneOverlay">
+              [ this viewer cannot play videos ]
+              <!--video class="wvVideo" autoplay="" loop="" controls="" preload="auto" type="video/mp4"
                      src="http://viewer-pro.osimis.io/instances/e465dd27-83c96343-96848735-7035a133-1facf1a0/frames/0/raw">
-              </video>
-            </div-->
+              </video-->
+            </div>
                 
             <div v-if="status == 'loading'" class="wvPaneOverlay">
               <span class="wvLoadingSpinner">
@@ -617,7 +618,7 @@
         <div v-bind:id="prefix + '-container'"
              style="position: absolute; left: 0; top: 0; width:100%;height:100%;overflow:auto;line-height: 0px;">
           <canvas v-bind:id="prefix + '-canvas'"
-                  style="position: absolute; top:0px; left:0px; background-color: white;"
+                  style="position: absolute; top:0px; left:0px;"
                   oncontextmenu="return false"></canvas>
         </div>
 
--- a/Applications/StoneWebViewer/WebApplication/pdf-viewer.js	Thu Nov 19 10:21:20 2020 +0100
+++ b/Applications/StoneWebViewer/WebApplication/pdf-viewer.js	Thu Nov 19 10:29:33 2020 +0100
@@ -168,6 +168,7 @@
         this.pdfDoc.getPage(pageNum).then(function(page) {
           var viewport = page.getViewport({scale: that.scale});
 
+          that.canvas.style['background-color'] = 'white';  // avoids flickering while the page changes
           that.canvas.height = viewport.height;
           that.canvas.width = viewport.width;