[Vuejs]-Displaying video in internal storage (Vue)

0👍

Lok, most local storage directories on browsers limit to about ~10 MB or less and differs greatly across browsers.

See:
What is the max size of localStorage values?

Even if it was a small video, lets say about 3MB, you would have to encode it then put it in the localstorage then decode it when you want to retrieve from the local storage.

MP4 file not encoded:

^@^@^@^Xftypmp42^@^@^@^@isommp42^@^A<86><98>moov^@^@^@lmvhd^@^@^@^@ÙÜR^YÙÜR^Y^@^@0^@^@7°O^@^A^@^@^A^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@^@^@^@^@^@^@^@^@^@^>
0stco^@^@^@^@^@^@^B<88>^@^A<86>¸^@^CÝÞ^@^E^GA^@^E<8c>n^@^F%<96>^@^Fæ@^@^G<9c>^H^@^Hn¢^@ F2^@^L)ê^@^NÔ3^@^PI/^@^R^B<9a>^@^RLÖ^@^Rs^_^@^SRk^@^Sö<8e>^@^T<90>^H^@^U^V§^@^U´b^@^Y^F]^@^[>
E=^A^K^\^U^A^

This binary may cause problems.

There’s ways to encode the video into base64 which can be encoded to and decoded from for easier handling with the raw data of the video file.

See:
how to decode video from base64?

Also:
https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding

Leave a comment