5 Replies Latest reply on Feb 15, 2013 8:48 PM by TexasApexDeveloper

    Playing a Video in Apex


      I am trying to get a video to display in the database. I tried uploading the video into the Shared Components --> Images, but I cannot get it to display. I know that another option is to store it in a table as a BLOB but I am somewhat new to Apex so I cannot find how to get hte video into the table that I created. I have done multiple searches and cannot seem to find the answer to my question. Can anyone provide some pointers on how to get this to work. I am working in Oracle Database 11g Express.

      Thank You,
        • 1. Re: Playing a Video in Apex
          Maybe this older thread will help??: How to post video in Apex4.2?

          Thank you,

          Tony Miller
          Ruckersville, VA
          • 2. Re: Playing a Video in Apex
            Ramesh P, Oracle APEX Developer
            --Database procedure to get the file
            create or replace PROCEDURE get_video(pfileid IN NUMBER) IS
            v_blob BLOB;
            v_length NUMBER;
            v_mime_type VARCHAR2(300);
            v_file_name VARCHAR2(200);
            -- get pdf_data and its mime type from the database
            SELECT file_blob, mime_typ, file_nm
            INTO v_blob, v_mime_type, v_file_name
            FROM appl_gui.hcd_cont_dtl_file
            WHERE tablex = pfileid;
            v_length := dbms_lob.getlength(v_blob);
            owa_util.mime_header(v_mime_type, FALSE);
            htp.p('Content-length: ' || v_length);
            htp.p('Content-Disposition: filename="' || v_file_name || '"');
            WHEN OTHERS THEN
            RAISE_APPLICATION_ERROR(-20001, 'Error: ' || SQLERRM);
            END get_video;

            --Application Process Name it as GET_VIDEO

                      <embed type="application/x-mplayer2" src="f?p=&APP_ID.:25:&APP_SESSION.:APPLICATION_PROCESS=GET_VIDEO::::" name="MediaPlayer" width=800 height=300></embed>
            • 3. Re: Playing a Video in Apex
              Why not just publish the video to Youtube and use something like fancybox (http://fancybox.net/) to open the video in an overlay when the link is clicked? It may not be a good choice to store video content inside database BLOB since it consumes too much database memory and takes too long to download the video. I have one application that simply stores the URL's of the Youtube videos and people click the links and view the video in an overlay box (fancybox).

              • 4. Re: Playing a Video in Apex
                This was actually the first thing I tried and I only got a blank white region. I don't know what I might be missing.
                • 5. Re: Playing a Video in Apex
                  Have you seen this posting?? Play video files

                  Thank you,

                  Tony Miller
                  Ruckersville, VA