【问题标题】:Is there a way to catch timelineregionenter event from shaka player on CAF Receiver?有没有办法从 CAF 接收器上的 shaka 播放器捕获时间线区域输入事件?
【发布时间】:2019-04-03 19:42:24
【问题描述】:

我目前正在尝试从 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 播放器上尝试这个清单。我发现在 timelineregionenter 和 timelineregionexit 的广告事件语法中要监听的好事件。这些事件由 Shaka 在遇到 EventStream 和 sub Event 时触发,而 emsg 事件在遇到 InbandEventStream 时触发。问题是我在 Cast Framework 文档中看不到这些类型的错误的任何参考。我的印象是CAF事件EMSG_EVENT只能由InbandEventStream触发。

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

谢谢你:)

【问题讨论】:

    标签: google-cast caf


    【解决方案1】:

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

    谢谢!

    【讨论】:

      猜你喜欢
      • 2021-07-02
      • 1970-01-01
      • 1970-01-01
      • 2018-08-09
      • 2010-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多