有没有办法从CAF接收器上的shaka播放器捕捉timelineregionenter事件?

问题描述 投票:0回答:1

我目前正在尝试从Dash清单中插入广告。虽然我知道这可以通过Ad Breaks完成,但我希望直接从我的清单中捕获广告事件。起初我试图用这个清单捕获EMSG_EVENT但没有触发的事件:

<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>

我期待从此触发2个事件(在第2和第5秒)。然后我决定直接在Shaka播放器上尝试这个清单。我发现要听取timelineregionentertimelineregionexit这个广告事件语法的好事。当遇到EventStream和sub Event时,Shaka会触发这些事件,而遇到InbandEventStream时会触发emsg事件。问题是我在Cast Framework文档中没有看到这些类型的错误的任何引用。我的印象是CAF事件EMSG_EVENT只能由InbandEventStream触发。

所以,我的问题是:无论如何要在CAF接收器上捕捉timelineregionentertimelineregionexit事件?

谢谢 :)

google-cast caf
1个回答
0
投票

AFAIK我不认为Cast Framework有这些事件。 Cast仅支持Shaka的EMSG。

谢谢!

© www.soinside.com 2019 - 2024. All rights reserved.