In my SAPUI5 application I am trying to include a video, which is working very well. The video is from a media stream from SAP Gateway, which is built with OData V2. The video is shown in a custom SAPUI5-Control, very simple, just a html-video tag.
The problem is that in Chrome or Edge, the video's progress bar doesn't work. You cannot move the slider back or forth. In Firefox, on the other hand, this is no problem and the videoplayer works as expected.
I read, that Chrome and Firefox handle video processing differently. While it is Ok for Firefox to get the stream via a HTTP-200 request, Chrome requires a HTTP-206 request.
Can you tell me, if it is possible inside the ABAP-Definition of the Video-Stream, I handled this in /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_STREAM, that I serve the stream with in a manner, chrome understands it?
My Stream Implementation in ABAP (the video is saved in the MIME Repo)
DATA LS_STREAM TYPE /IWBEP/IF_MGW_CORE_SRV_RUNTIME=>TY_S_MEDIA_RESOURCE.
DATA(LO_MIME) = CL_MIME_REPOSITORY_API=>GET_API( ).
LO_MIME->GET(
EXPORTING
I_URL = 'MIME_PATH/video.mp4'
IMPORTING
E_CONTENT = LS_STREAM-VALUE
E_MIME_TYPE = LS_STREAM-MIMETYPE
).
IF LS_STREAM_MIMETYPE = 'video/mp4'.
SET_HEADER( IS_HEADER = VALUE #( NAME = 'Content-Disposition' VALUE = 'inline; filename=' && |video.mp4| ) ).
COPY_DATA_TO_REF(
EXPORTING
IS_DATA = LS_STREAM
CHANGING
CR_DATA = ER_STREAM
).
I have changed my videofile with MP4TOOLS into a fragemented mp4 too.
Inside the Definition in SEGW, Media is enabled for the EntitySet.
Thank you very much