Browse Source

暂时磨平Web和Shell加载VID差异

Melon 9 months ago
parent
commit
4b69a0165d
2 changed files with 9 additions and 8 deletions
  1. 5 5
      lib/data_channel/channel_web.dart
  2. 4 3
      lib/data_host/web/data_host.dart

+ 5 - 5
lib/data_channel/channel_web.dart

@@ -18,10 +18,10 @@ class VidDataChannelImpl extends VidDataChannel {
 
   @override
   Future<AsyncVidImageDataBase> buildSource() async {
-    if (FPlatform.isPureWeb) {
-      return AsyncHttpVidImageData(url, downloadCallback: onDownloadCallback);
-    } else {
-      return AsyncShellVidImageData(url, downloadCallback: onDownloadCallback);
-    }
+    // if (FPlatform.isPureWeb) {
+    return AsyncHttpVidImageData(url, downloadCallback: onDownloadCallback);
+    // } else {
+    //   return AsyncShellVidImageData(url, downloadCallback: onDownloadCallback);
+    // }
   }
 }

+ 4 - 3
lib/data_host/web/data_host.dart

@@ -46,9 +46,10 @@ class VidDataHost extends VidDataHostBase {
       await _hostInstance!.release();
       _hostInstance = null;
     }
-    _hostInstance = VidDataHostEnv.isShell
-        ? _VidDataHostShell(url)
-        : _VidDataHostBroswer(url);
+    // _hostInstance = VidDataHostEnv.isShell
+    //     ? _VidDataHostShell(url)
+    //     : _VidDataHostBroswer(url);
+    _hostInstance = _VidDataHostBroswer(url);
     return await _hostInstance!.load();
   }