Skip to content

Commit

Permalink
Temporarily fix #63 and #75 iOS spinner always showing
Browse files Browse the repository at this point in the history
  • Loading branch information
mderrick committed Jul 26, 2017
1 parent 4b4ec1c commit 4c4f982
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DefaultPlayer/DefaultPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ export default videoConnect(
readyState,
networkState,
error: error || networkState === 3,
loading: readyState < 4,
// TODO: This is not pretty. Doing device detection to remove
// spinner on iOS devices for a quick and dirty win. We should see if
// we can use the same readyState check safely across all browsers.
loading: readyState < (/iPad|iPhone|iPod/.test(navigator.userAgent) ? 1 : 4),
percentagePlayed: getPercentagePlayed(restState),
percentageBuffered: getPercentageBuffered(restState),
...restState
Expand Down

0 comments on commit 4c4f982

Please sign in to comment.