本文介绍了Chromecast设备支持avc1.66.31,mp4a.40.2吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个m3u8文件,如下所示:

I have an m3u8 file that looks like this:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=2048805,CODECS="avc1.66.31,mp4a.40.2",RESOLUTION=1280x720
chunklist_w517510829.m3u8

而尝试播放时出现以下错误:

And I get the following error when trying to play it:

Uncaught NotSupportedError: Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp2t; codecs="avc1.66.31,mp4a.40.2"') is unsupported.
player.js:1682 Uncaught TypeError: undefined is not a function

如果我删除 avc1.66.31,mp4a.40.2 ,可以在Chromecast上正常运行。我将此示例用作播放器

Strangely enough it plays fine on the Chromecast if I remove avc1.66.31,mp4a.40.2. I am using this sample as a player https://github.com/googlecast/Cast-Player-Sample

谢谢。

推荐答案

某些Chromecast版本拒绝 avc1.66.31,因此建议通过更新播放列表或使用host.processManifest解决方法来使用 avc1.66.30

Some builds of Chromecast reject "avc1.66.31" so it is recommendation to use "avc1.66.30" instead either by updating the playlist or using host.processManifest workaround

host.processManifest = function(manifest) {
  return manifest.replace(/CODECS=\"avc1.66.([0-9]*)/g, 'CODECS=\"avc1.66.30');
};

在自定义接收器中。

这篇关于Chromecast设备支持avc1.66.31,mp4a.40.2吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 19:46