We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a94d610 commit a1a787fCopy full SHA for a1a787f
js/WebSocketExample.js
@@ -18,6 +18,7 @@ const ReactNative = require('react-native');
18
const {
19
Image,
20
PixelRatio,
21
+ Platform,
22
ScrollView,
23
StyleSheet,
24
Text,
@@ -69,7 +70,7 @@ class WebSocketImage extends React.Component {
69
70
state: {blob: ?Blob} = {blob: null};
71
componentDidMount() {
72
let ws = (this.ws = new WebSocket(this.props.url));
- ws.binaryType = 'blob';
73
+ ws.binaryType = Platform.OS === 'windows' ? 'arraybuffer' : 'blob';
74
ws.onmessage = event => {
75
if (event.data instanceof Blob) {
76
const blob = event.data;
0 commit comments