Wednesday, June 8, 2022
HomeGame Developmentblob.arrayBuffer will not be a operate - Cocos Creator

blob.arrayBuffer will not be a operate – Cocos Creator


Hello everybody.
I would like to make use of WebSocket to speak with my server-side. Every thing works properly within the browser, however I’ve ‘blob.arrayBuffer will not be a operate’ in ios.
Right here is my code:

    public async onSocketMessage(occasion) {
        let blob = occasion.information as Blob;
        const buffer = await blob.arrayBuffer();
        const uint8ArrayNew = new Uint8Array(buffer);
        this.parseMessage(uint8ArrayNew);
    }

My server-side sends a Blob information sort, then I would like parse this blob to a response object. Please assist me repair this drawback. Is there some other method ?
Thanks a lot.


My mistake , occasion.information is ArrayBuffer.
Thanks.

This matter was routinely closed 24 hours after the final reply. New replies are not allowed.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments