I am presently trying to do ad insertion from a Dash manifest. While I know this could be done with Ad Breaks, I was hoping to catch ad event directly from my manifest. At first I was trying to catch EMSG_EVENT with this manifest but no event where triggered :
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" maxSegmentDuration="PT1.003S" mediaPresentationDuration="PT23M34.109792S" minBufferTime="PT0S" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static">
<Period id="1" start="PT0S">
<BaseURL>https://my-base-url</BaseURL>
<EventStream schemeIdUri="urn:mpeg:dash:event:callback:2015" timescale="1" value="1">
<Event id="2" messageData="https://some-reporting-urn1" presentationTime="2"/>
<Event id="3" messageData="https://some-reporting-urn2" presentationTime="5"/>
</EventStream>
<AdaptationSet bitstreamSwitching="true" contentType="video" group="1" id="1" maxFrameRate="30000/1001" maxHeight="1080" maxWidth="1920" mimeType="video/mp4" par="16:9" segmentAlignment="true" startWithSAP="1">
<SegmentTemplate initialization="S!d0FEQVNIVP7...8Bnw__/QualityLevels($Bandwidth$)/Fragments(video=Init)" media="S!d0FEQVNIVP7...8Bnw__/QualityLevels($Bandwidth$)/Fragments(video=$Time$)" timescale="10000000">
<SegmentTimeline>
<S d="10010000" r="9"/>
<S d="2000000" r="0"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation bandwidth="325950" codecs="avc1.4d4015" frameRate="30000/1001" height="270" id="dzE--QSf" sar="1:1" width="480"/>
<Representation bandwidth="631425" codecs="avc1.4d401e" frameRate="30000/1001" height="360" id="dzGBogmf" sar="1:1" width="640"/>
<Representation bandwidth="1236504" codecs="avc1.4d401e" frameRate="30000/1001" height="480" id="dzEY3hKf" sar="1:1" width="720"/>
<Representation bandwidth="1939045" codecs="avc1.4d401f" frameRate="30000/1001" height="540" id="dzFllh2f" sar="1:1" width="960"/>
<Representation bandwidth="3747150" codecs="avc1.64001f" frameRate="30000/1001" height="720" id="dzFOLTmf" sar="1:1" width="1280"/>
<Representation bandwidth="4945982" codecs="avc1.64001f" frameRate="30000/1001" height="720" id="dzE-eEuf" sar="1:1" width="1280"/>
<Representation bandwidth="5555565" codecs="avc1.640028" frameRate="30000/1001" height="1080" id="dzFtxVSf" sar="1:1" width="1920"/>
</AdaptationSet>
<AdaptationSet bitstreamSwitching="true" contentType="audio" group="2" id="2" lang="und" mimeType="audio/mp4" segmentAlignment="true">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentTemplate initialization="S!d0FEQVNIVP7...8Bnw__/QualityLevels($Bandwidth$)/Fragments(audio_482_und=Init)" media="S!d0FEQVNIVP7...8Bnw__/QualityLevels($Bandwidth$)/Fragments(audio_482_und=$Time$)" presentationTimeOffset="14" timescale="32000">
<SegmentTimeline>
<S d="32767" r="0" t="14"/>
<S d="31744" r="0"/>
<S d="31745" r="0"/>
<S d="32767" r="0"/>
<S d="31745" r="0"/>
<S d="31744" r="1"/>
<S d="32767" r="0"/>
<S d="31745" r="0"/>
<S d="31744" r="0"/>
<S d="7168" r="0"/>
</SegmentTimeline>
</SegmentTemplate>
<Representation audioSamplingRate="32000" bandwidth="40000" codecs="mp4a.40.2" id="dyHiAZ8."/>
</AdaptationSet>
</Period>
</MPD>
I was expecting from this to have 2 events triggered (at seconds 2 and 5). Then I decided to try this manifest directly on Shaka player. I found out that the good events to listen to for this syntax of ad event where timelineregionenter
and timelineregionexit
. These events are triggered by Shaka when encountering EventStream
with sub Event
while emsg
events are triggered when encountering InbandEventStream. The thing is I don't see any reference of these types of errors in the Cast Framework documentation. I have the impression that CAF event EMSG_EVENT
can only be triggered by InbandEventStream
.
So, my question : is there anyway to catch timelineregionenter
or timelineregionexit
events on CAF Receiver ?
Thank you :)