R
R
Roquie2014-08-13 20:26:00
PHP
Roquie, 2014-08-13 20:26:00

How to play mp3 records in html5 player using ssh + scp ... ?

The question may be silly, but the bottom line is this...
There is a folder on the server, where there are many mp3 records, which are attached to the md5 name with an entry in the table.
The plate is approximately the following:
id | user_id | mp3
----------------------------
1 | 123 | hash.mp3
I have ssh access to the directory and I need to somehow play these entries in the html5 player. At the same time, manage to do it in such a way that only the owner of the personal account while in it could play the recording.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
s1dney, 2014-08-13
@Roquie

For starters, you need to abandon the ssh option and shove everything into a file storage with at least rest access.

S
sasha, 2014-08-13
@madmages

directly in html5 will not work. in html5, you need to transfer the file name on the server and the browser will already tear this file via http and will not be able to enter via ssh. as an option, you can make a cache of songs played by the user on the server. but something I really doubt the performance of such a garden, especially if it is designed for more than one person

S
Sergey Sova, 2014-08-13
@LestaD

make it easier. Write a php script that proxies your files
In HTML, specify the path to your proxy file: /getaudio.php?id=8445&useruid=123
And in the script, check all access rights and so on, if everything is OK, then give the file from the desired directory, if not, then some thread file with the sound of the error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question