attachment_preview icon indicating copy to clipboard operation
attachment_preview copied to clipboard

WAV files?

Open bcolflesh opened this issue 5 years ago • 6 comments

Will this add a player for .wav format attachments?

bcolflesh avatar Apr 12 '19 18:04 bcolflesh

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 avatar Apr 12 '19 20:04 bcolflesh

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

bcolflesh avatar Apr 12 '19 21:04 bcolflesh

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.

clonemeagain avatar Apr 13 '19 05:04 clonemeagain

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.

bcolflesh avatar Apr 13 '19 05:04 bcolflesh

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.

clonemeagain avatar Apr 13 '19 08:04 clonemeagain

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...

bcolflesh avatar Apr 17 '19 03:04 bcolflesh