Hello i need to be able to
play short music files(mp3) (3sec Max)
on click event.(on client side)
already tried javascript
the files located in blob storage
any tips/pointers.
thanks
ori

It may be better solutions out there, but i have solved it this way:
1. I have created a folder on the webserver that empties every night
2. When a visitor clicks on playing the MP3 file I use FSO to look if it exists in the temp folder with the filename: <TABLENAME>_<RECORDID>.mp3
3. If it exists it plays the file right away, if not it gets downloaded from blog to the server with the procedure bellow.

CREATE PROCEDURE [dbo].[BinaryToFile] (@FilePath VARCHAR(MAX), @Binary VARBINARY(max)) AS
BEGIN
    SET NOCOUNT ON;

    DECLARE @init int

    EXEC sp_OACreate 'ADODB.Stream', @init OUTPUT; -- An instace created
    EXEC sp_OASetProperty @init, 'Type', 1; -- Set property value to the instance
    EXEC sp_OAMethod @init, 'Open'; -- Calling a method
    EXEC sp_OAMethod @init, 'Write', NULL, @Binary; -- Calling a method
    EXEC sp_OAMethod @init, 'SaveToFile', NULL, @FilePath, 2; -- Calling a method
    EXEC sp_OAMethod @init, 'Close'; -- Calling a method
    EXEC sp_OADestroy @init; -- Closed the insatnce
END
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.