播放存储在blob中的Oracle数据库中的视频- Oracle Apex

d5vmydt9  于 2023-10-16  发布在  Oracle
关注(0)|答案(1)|浏览(127)

在oracle apex中,是否可以在播放器(交互式报告或plsql动态内容)中加载blob(视频)?
举例来说:

select 
ID, 
NAME,
decode(NVL(dbms_lob.getlength("BLOB"),0),0,NULL,
       '<video width="400" controls><source src="' ||apex_util.get_blob_file_src('P18_BLOB',IMG_ID)||'" type="video/mp4"></video>') "VIDEO"
from VIDEO;
lmyy7pcs

lmyy7pcs1#

Click here to see run time Image对于交互式报表:

(1) Create ITEM (in this example - P3_VIDEO)
    Type: Hidden
    Source: Type => Database Column
            Database Column => Your blob column in the table that has video content
    Used: Always replacing existing value in session state.

(2)Create ITEM (in this example - P3_ID)
    Type: Hidden
    Source: Type => Database Column
            Database Column => Primary key column of the table has video content
    Used: Always replacing existing value in session state.

 (3)Create a page process
    Type: Automatic Row Fetch
    Table name: Your table that has video content
    Primary Key Column: Primary key column of the table has video content
    Primary Key Item: P3_ID (In this example)
        
 (4) SQL Query of the IR
       SELECT ID,'<video width="320" height="240" controls>
       <source src="'||apex_util.get_blob_file_src ('P3_VIDEO',ID, 
       p_content_disposition => 'inline')||'" type="video/mp4">
       our browser does not support the video tag.
       </video>' as VIDEO
       FROM VIDEO;
  
 (5) select the column - VIDEO (in this example)
     Type - Plain Text
     Security - Escape Special Characters - No

相关问题