Skip to content

Commit 4c4f982

Browse files
committed
Temporarily fix #63 and #75 iOS spinner always showing
1 parent 4b4ec1c commit 4c4f982

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/DefaultPlayer/DefaultPlayer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ export default videoConnect(
128128
readyState,
129129
networkState,
130130
error: error || networkState === 3,
131-
loading: readyState < 4,
131+
// TODO: This is not pretty. Doing device detection to remove
132+
// spinner on iOS devices for a quick and dirty win. We should see if
133+
// we can use the same readyState check safely across all browsers.
134+
loading: readyState < (/iPad|iPhone|iPod/.test(navigator.userAgent) ? 1 : 4),
132135
percentagePlayed: getPercentagePlayed(restState),
133136
percentageBuffered: getPercentageBuffered(restState),
134137
...restState

0 commit comments

Comments
 (0)