shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.2k stars 1.34k forks source link

VAST Loading Error, HLS MediaFile not supported? #4792

Closed WINOFFRG closed 1 year ago

WINOFFRG commented 1 year ago

Have you read the Tutorials? Yes

Have you read the FAQ and checked for duplicate open issues? Yes

What version of Shaka Player are you using? v4.3.0 (uncompiled)

Please ask your question Error: client_side_ad_manager.js:133 There was an ad error from the IMA SDK: AdError 403: Linear assets were found in the VAST ad response, but none of them matched the video player's capabilities.

As I checked about this error, This comes up when the Ad Media file isn't supported by Player. In my case its a HLS Video and IMA Ads SDK identifies the media type using type attribute in MediaFile tag, which in my case is application/x-mpegURL

<MediaFiles>
<MediaFile delivery="progressive" width="0" height="0" bitrate="0" type="application/x-mpegURL">
<![CDATA[ https://REDCATED/ns/1661775151/ce94b8774e661fa034b437ab681193e0/master.m3u8 ]]>
</MediaFile>
</MediaFiles>

Since here we use Shaka Player video instance only for ads playback then why isn't this media supported?

joeyparrish commented 1 year ago

I do not know. I'm not well versed in the IMA SDK.

Searching through the docs, it could be that this needs to be set:

https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRenderingSettings#mimeTypes

But in https://github.com/shaka-project/shaka-player/issues/4394#issuecomment-1210218852, it seems that someone else tried that and it did not work.

In a similar issue, https://github.com/shaka-project/shaka-player/issues/2460#issuecomment-628639656, someone concluded that IMA is trying to feed that linear playlist URL directly to an overlaid video element, without passing it to the player itself. That makes sense to me. When an ad plays, we hand control over to IMA, which owns the overlaid video element.

I don't know where to go from here. For now, I'll close this as a duplicate of #4394, and move these details there. Perhaps someone who knows IMA better will have an idea on how to proceed.