doublespeakgames / adarkroom

A Dark Room - A Minimalist Text Adventure
Mozilla Public License 2.0
7.08k stars 1.59k forks source link

resolve loadAudioFile error when query string in URL #718

Closed IceeAn closed 7 months ago

IceeAn commented 7 months ago

When the URL contains a query string (e.g., "?lang=zh_cn") or is accessed with index.html, loadAudioFile fails to load the audio files (#694 ). The issue has been resolved by removing that from the URL before concatenating src link. It seems that this project supports IE9 and above, so we use the method of concatenating to construct the origin instead of relying on window.location.origin.