clonemeagain / attachment_preview

osTicket Plugin: Allows inline view of attachments
GNU General Public License v2.0
47 stars 16 forks source link

WAV files? #38

Open bcolflesh opened 5 years ago

bcolflesh commented 5 years ago

Will this add a player for .wav format attachments?

bcolflesh commented 5 years ago

I took a look in the code and saw the .wav check, so I installed this. Works in a browser or Android devices, does not work on iOS at all, regardless of browser - embedded HTML5 player issues on iOS I assume.

Anyone have a cross-platform solution? Should I plug jplayer or something in there instead?

bcolflesh commented 5 years ago

Probably going to have to file_put_contents() the /help/file.php? request for this to work as a src value on iOS.

clonemeagain commented 5 years ago

Hey mate, don't have any iOS devices to test with so I've not encountered that issue, is it all attachments or just audio? There might be a permission you need to enable for Chrome or Safari for it to play.. Not sure, it's been a while since I've seen one.

bcolflesh commented 5 years ago

No worries, it's because iOS decided programmatic audio sources are a security risk I guess - I found that OSTicket has some optional core plugins and one of them will place attachments in the filesystem instead of the database and I'm guessing that will allow iOS to play them. I'll post back here with results on the weekend or Monday my time.

clonemeagain commented 5 years ago

Hmm, that's not what that means, the front-end is the same. It just means the files aren't stored in the DB or S3 etc. Still uses the same file.php adapter.

bcolflesh commented 5 years ago

Late update, you are correct, the file system plugin does not change the way the file is served (via the file.php script). So the answer is a rewrite to a temp file I guess? Or figuring out what exactly iOS errors out on via the current method...