CAF:音频跟踪更改问题

时间:2018-04-09 08:56:03

标签: chromecast google-cast google-cast-sdk caf-receiver-sdk

我们已经创建了一个自定义CAF接收器。当我们尝试切换音轨时,接收器播放器仅在第一次请求时正常工作。如果我们尝试发出其他请求,我们可以在接收器端看到正确的EDIT_TRACK_INFO_REQUEST(带有正确的音频TrackId),但音频不会改变。

我们在具有不同资产的web / IOS / ANDROID发件人上复制相同的行为。

有没有人有任何建议? 提前谢谢。

---其他细节:

平滑流式传输清单音频片段,请注意语言不遵循RFC规范

<StreamIndex Name="audio101_spa" Language="spa" Type="audio" Subtype="AACL" QualityLevels="1" Chunks="0" Url=".../QualityLevels({bitrate})/Fragments(audio101_spa={start time})">
        <QualityLevel Bitrate="96000" Index="0" FourCC="AACL" SamplingRate="22050" Channels="2" BitsPerSample="16" PacketSize="4" AudioTag="255" CodecPrivateData="1390"/>

<StreamIndex Name="audio102_eng" Language="eng" Type="audio" Subtype="AACL" QualityLevels="1" Chunks="0" Url=".../QualityLevels({bitrate})/Fragments(audio102_eng={start time})">
        <QualityLevel Bitrate="96000" Index="0" FourCC="AACL" SamplingRate="22050" Channels="2" BitsPerSample="16" PacketSize="4" AudioTag="255" CodecPrivateData="1390"/>

在接收方实际上在PLAYER_LOAD_COMPLETE上我们执行轨道的自定义处理:

//custom RFC mapping from values that comes from 
const tracksLabelsObj = {
      "spa": { name: "Español", lang: "es" },
      "eng": { name: "Inglés", lang: "en" },
      "ita": { name: "Italiano", lang: "it" }
...}

我们执行音轨的映射和处理

for (i = 0; i < request.media.tracks.length; i++) {
      trackLanguage = tracksLabelsObj[request.media.tracks[i].language];
      if (((request.media.tracks[i].type == 'AUDIO') || (request.media.tracks[i].type == 'TEXT')) && (trackLanguage != undefined)) {
        //change labels and code 
        request.media.tracks[i].name = trackLanguage.name;
        request.media.tracks[i].language = trackLanguage.lang;

      }
}

我们在文档上建立了另一种处理方法,使用:

playerManager.setMessageInterceptor(
      cast.framework.messages.MessageType.EDIT_AUDIO_TRACKS, request => {...

if (request.media != null) {
        console.log("CHROMECAST: EDIT AUDIO TRACKS - Changing media tracks");
        for (i = 0; i < request.media.tracks.length; i++) {
          trackLanguage = tracksLabelsObj[request.media.tracks[i].language];
          if (((request.media.tracks[i].type == 'AUDIO') || (request.media.tracks[i].type == 'TEXT')) && (trackLanguage != undefined)) {
            //Cambio labels lingua
            request.media.tracks[i].name = trackLanguage.name;
            request.media.tracks[i].language = trackLanguage.lang;
          }
        }
    }
...}

但我们无法正确处理它,对此还有任何建议吗?

对于内部测试,我们还使用了具有相同行为的明确流式传输 - http://harmonic.e2e.purpledrm.com.edgesuite.net/Content/SS/VOD/yjO9VXw7-ElephantsDreamH264720p/ElephantsDream.ism/Manifest

非常感谢。

0 个答案:

没有答案