Chromecast Receiver CAF,无限加载MPEG-DASH流,可访问ShakaPlayer [英] Chromecast Receiver CAF, infinite loading of MPEG-DASH stream, ShakaPlayer access

查看:114
本文介绍了Chromecast Receiver CAF,无限加载MPEG-DASH流,可访问ShakaPlayer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Chromecast播放MPEG-DASH直播时遇到问题。由于清单中缺少UTCTiming标签,因此发生了无限加载。已知问题是使用ShakaPlayer发生的。这是常见问题解答中的第一个问题: https:// github .com / google / shaka-player / blob / master / docs / tutorials / faq.md

I've got a problem with Chromecast playing MPEG-DASH livestream. The infinite loading occurs because of the lack of UTCTiming tag in manifest. The problem is known to occur with ShakaPlayer. It's the first problem in FAQ: https://github.com/google/shaka-player/blob/master/docs/tutorials/faq.md

但是在chromecast上,我无法访问ShakaPlayer直接(或者也许有一种我不熟悉的方式)。我可以想到的问题有两种解决方案:

On chromecast however, i can't access the ShakaPlayer directly (or maybe there is a way that i'm not familiar with). There are 2 solutions to the problem that i can think of:


  1. 动态修改清单。




 this.playbackConfig.manifestHandler = (manifest) => {
    //adding UTCTiming to the manifest with attributes like this:
    customUTC.setAttribute("schemeIdUri", "urn:mpeg:dash:utc:http-head:2014");
    customUTC.setAttribute("value", this.manifestUrl); }


但这不会改变chromecast播放器的行为,仍然会无限加载,我在做什么吗?

This however doesn't change the behaviour of the chromecast player, the infinite loading still occurs, am I doing something wrong here?


  1. 通过设置 useLegacyDashSupport使用较旧的播放器(媒体播放器库)可以使chromecast正常播放流,但会破坏UI。仅在需要时才可以动态切换到旧播放器吗?例如,基于清单或在发件人应用程序的loadRequest中。

  1. Using the older player (Media Player Library) via setting useLegacyDashSupport makes chromecast play stream normally, but breaks UI a little.Can I switch to the legacy player dynamically only when it's needed? Based on a manifest for example, or during loadRequest from sender app.


推荐答案

c $ c> UTCTiming 元素是必需的,因为Shaka Player需要知道服务器上的时间,以便可以在正确的时间播放。如果客户端和服务器的时钟时间不同,则视频可能无法播放。实际上,这并不是Shaka Player的要求,而通常是DASH的要求。

The UTCTiming element is required since Shaka Player needs to know what time is on the server so it can play at the right time. If the client and the server have different clock times, the video will likely fail to play. It isn't really a requirement of Shaka Player, more of a requirement of DASH in general.

但是如果您不能在清单中设置元素,则可以使用 manifest.dash.clockSyncUri (请参阅 docs )配置参数来设置要使用的时钟同步URL。例如:

But if you can't set the element in the manifest, you can use the manifest.dash.clockSyncUri (see docs) configuration parameter to set a clock sync URL to use. For example:

player.configure({manifest: {dash: {clockSyncUri: 'https://example.com/clock'}}});

请注意,用于时钟同步的URL必须具有正确的 Date 标头(请注意缓存),如果请求是跨源的,则需要公开标头,否则将出现 CORS 错误。

Note that the URL used for clock sync needs to have a correct Date header on the response (be careful of caching) and if the request is cross-origin, you'll need to expose the header or there will be CORS errors.

此外, shaka-player#999 是一项功能要求,可帮助您漂移。该功能着陆后,播放器将使用清单中的片段来猜测实时边缘,而不是使用时钟时间。这意味着您无需设置时钟同步。

Also, shaka-player#999 is a feature request to help with drift. After that feature lands, the Player will use the segments in the manifest to guess the live edge instead of using the clock time. This means you won't have to set up clock sync.

这篇关于Chromecast Receiver CAF,无限加载MPEG-DASH流,可访问ShakaPlayer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆