Browse Source

初始状态不显示错误信息

narro 6 years ago
parent
commit
e607fdff43
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/DefaultPlayer/DefaultPlayer.js

+ 1
- 2
src/DefaultPlayer/DefaultPlayer.js View File

48
         playbackrates = JSON.parse(playbackrates);
48
         playbackrates = JSON.parse(playbackrates);
49
     }
49
     }
50
     let onScreenClickCallback = restProps['onScreenClickCallback'];
50
     let onScreenClickCallback = restProps['onScreenClickCallback'];
51
-
52
     return (
51
     return (
53
         <div className={[
52
         <div className={[
54
             styles.component,
53
             styles.component,
150
         video: {
149
         video: {
151
             readyState,
150
             readyState,
152
             networkState,
151
             networkState,
153
-            error: error || networkState === 3,
152
+            error: error || (readyState > 0 && networkState === 3),
154
             // TODO: This is not pretty. Doing device detection to remove
153
             // TODO: This is not pretty. Doing device detection to remove
155
             // spinner on iOS devices for a quick and dirty win. We should see if
154
             // spinner on iOS devices for a quick and dirty win. We should see if
156
             // we can use the same readyState check safely across all browsers.
155
             // we can use the same readyState check safely across all browsers.