I'm new in PIXI.js and I have a pretty specific task. I have to distribute my app as index.html + main.js
files so anybody can open it without internet connection and just by double-clicking on index.html
, in other words, I have to make my app running without a web server.
I found the solution with converting my assets to base64 in advance and it works for images and sounds but not for videos.
Is there a way to make PIXI create a video sprite from base64 string data:video/mp4;base64,...
? Or any other way to reach my goal - working without web-server.
Asked
Active
Viewed 377 times
0

through.a.haze
- 516
- 1
- 6
- 15
-
you can have only those 2 files? No other *.mp4 etc files allowed? – domis86 Jun 10 '20 at 17:24
-
@domis86 the problem is I can't have a web-server and PIXI.js doesn't allow loading files from file system, like `file://` - it complains about cross origin requests. That's why I'm looking for another way to do it. – through.a.haze Jun 11 '20 at 11:16
-
Please read - https://github.com/pixijs/pixi.js/issues/33 - as you see it is problematic to make browser to allow loading of "local file". It is not pixi.js fault. – domis86 Jun 17 '20 at 18:37
-
But about using base64 video data - can you try advices from https://stackoverflow.com/a/26766604/3174731 ? – domis86 Jun 17 '20 at 18:43
1 Answers
0
In my case the video was soundless so I ended up with AnimatedSprite built on video frames encoded in base64.

through.a.haze
- 516
- 1
- 6
- 15