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.
--Database procedure to get the file
create or replace PROCEDURE get_video(pfileid IN NUMBER) IS
-- 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
WHERE tablex = pfileid;
v_length := dbms_lob.getlength(v_blob);
htp.p('Content-length: ' || v_length);
htp.p('Content-Disposition: filename="' || v_file_name || '"');
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20001, 'Error: ' || SQLERRM);
--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>
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).