[www-doc] [Git][VideoLAN.org/websites][master] 2 commits: Added ARM64 version verification on the home page.

Jean-Baptiste Kempf gitlab at videolan.org
Fri Oct 23 00:33:33 CEST 2020



Jean-Baptiste Kempf pushed to branch master at VideoLAN organization / websites


Commits:
5a7c6505 by Alexandre Zollinger Chohfi at 2020-10-23T00:33:24+02:00
Added ARM64 version verification on the home page.

- - - - -
247776bf by Alexandre Zollinger Chohfi at 2020-10-23T00:33:24+02:00
Applied error handling, per feedback.

- - - - -


1 changed file:

- www.videolan.org/include/os-specific.php


Changes:

=====================================
www.videolan.org/include/os-specific.php
=====================================
@@ -1,5 +1,6 @@
 <?php
 $win32version = '3.0.11';
+$winArm64version = '4.0.0-dev-20180508';
 $macosxversion = '3.0.11.1';
 $oldmacosxversion = '2.0.10';
 $version = '3.0.11';
@@ -11,6 +12,7 @@ $winrtversion = '3.1.2';
 $dlBase = "//get.videolan.org/vlc";
 $windowsLocation = "$dlBase/$win32version/win32/vlc-$win32version-win32.exe";
 $windows64Location = "$dlBase/$win32version/win64/vlc-$win32version-win64.exe";
+$windowsArm64Location = "http://people.videolan.org/~jb/Builds/ARM/vlc-$winArm64version-aarch64.zip";
 $osxLocation = "$dlBase/$macosxversion/macosx/vlc-$macosxversion.dmg";
 
 function replaceDLinfos( $downloadButton = "#downloadButton" )
@@ -49,9 +51,24 @@ function replaceDLinfos( $downloadButton = "#downloadButton" )
                    navigator.userAgent.indexOf('AMD64')>-1 ||
                    navigator.userAgent.indexOf('WOW64')>-1
            ))
-           OS="windows64";
-         else
-           OS="windows";
+           {
+               OS="windows64";
+           } else {
+               if (window.external && window.external.getHostEnvironmentValue && window.external.getHostEnvironmentValue('os-architecture').indexOf("ARM64") !== -1) {
+                   OS="windowsarm64";
+               }
+               else {
+                   try{
+                       var canvas = document.createElement('canvas');
+                       var gl = canvas.getContext('webgl');
+
+                       var debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
+                       var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
+                       if(renderer.indexOf("Qualcomm") !== -1)
+                           OS="windowsarm64";
+                   } catch (e) { }
+               }
+           }
        }
        if (navigator.appVersion.indexOf("Mac")!=-1) {
           if (navigator.platform.indexOf("MacPPC")!= -1 || navigator.platform.indexOf("PowerPC") != -1 ) OS="osxPPC";
@@ -113,8 +130,10 @@ function downloadButton()
 function getOS($os = null, $offset = 0, $count = null, $encode = null) {
     global $windowsLocation;
     global $windows64Location;
+    global $windowsArm64Location;
     global $osxLocation;
     global $win32version;
+    global $winArm64version;
     global $version;
     global $macosxversion;
     global $oldmacosxversion;
@@ -136,6 +155,12 @@ function getOS($os = null, $offset = 0, $count = null, $encode = null) {
             "latestVersion" => $win32version,
             "location"      => $windows64Location
         ),
+        "windowsarm64"   => array(
+            "name"          => "Windows ARM 64",
+            "size"          => '58 MB',
+            "latestVersion" => $winArm64version,
+            "location"      => $windowsArm64Location
+        ),
         "windowsphone"      => array(
             "name"          => "Windows Phone",
             "latestVersion" => $winrtversion,



View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/-/compare/80c2873b4f09de46ee8115c028a08342ef8ed7bd...247776bf75dfbd9a4e09ce8cc68176b6b8316b04

-- 
View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/-/compare/80c2873b4f09de46ee8115c028a08342ef8ed7bd...247776bf75dfbd9a4e09ce8cc68176b6b8316b04
You're receiving this email because of your account on code.videolan.org.




More information about the www-doc mailing list