0 Replies Latest reply on Feb 14, 2013 9:25 AM by Dird

    Streaming audio in APEX? (not downloading)

      Hi guys,

      I was wondering if anyone knows the technique to stream audio in APEX? I've got it working with basic HTML referencing my file on Dropbox at home but Dropbox is blocked at work so I can't do this. I've hosted it on the server with the APEX DB (In a directory called dird) and I've also loaded it into the DB (although I don't know if it was successful). The examples of dealing with BLOBs online all seem to be exporting to the filesystem again rather using it in a webpage. I don't want to download the file, I want to use it in an embed/HTML 5 audio audio tag. Can I refer to the database server's directory for the file? Or If I move the music file to #IMAGES# directory on the HTTP server then can I do src="#IMAGES#jap4.3gpp"? So far I've done the following:
      create table help.audio (
      aud_id number,
      aud_name varchar2(100),
      aud_data blob,
      CONSTRAINT audio_PK PRIMARY KEY (aud_id)
        l_bfile  BFILE;
        l_blob   BLOB;
        INSERT INTO help.audio (aud_id, aud_name, aud_data)
        VALUES (1, 'Japanese 4', empty_blob())
        RETURN aud_data INTO l_blob;
        l_bfile := BFILENAME('DIRD', 'jap4.3gpp');
        DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
        DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));