aws-samples / amazon-ivs-player-web-sample

This project contains code samples demonstrating how to build, package, and integrate with the Amazon IVS Player Web SDK.
https://docs.aws.amazon.com/ivs/
MIT No Attribution
75 stars 32 forks source link

Unknown IVS WEB SDK Error Message #84

Open SanskarDahiya opened 8 months ago

SanskarDahiya commented 8 months ago

I'm using IVS Web Sdk v1.21.0 in Next.JS / React.JS framework.

I'm getting various error code & error messages from ivs instance.

const onErrorCallback = (err) => {
/.../
const { code, type, message } = err
/.../
}

ivsPlayerRef.addEventListener(IVSPlayer.PlayerEventType.ERROR, onErrorCallback)

I'm getting various different code/message which I'm unable to replicate or understand. like: code -1, -3 & 4 message: 'No playable format', 'Failed to parse HLS master playlist invalid content type: application/octet-stream' & various others.

Few of the error message as mention below

1. Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp4;codecs="avc1.42001e"') is unsupported.
2. Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp4;codecs="mp4a.40.2"') is unsupported.
3. TypeError: t is undefined
4. DECODER_ERROR_NOT_SUPPORTED: audio decoder initialization failed
5. Unsupported source type
6. The MediaSource was closed upon opening
7. MediaSource.addSourceBuffer: Can't play type
8. t.headers is undefined
9. No playable format
10. PIPELINE_ERROR_DECODE
11. PIPELINE_ERROR_DECODE: video decoder reinitialization failed
12. PIPELINE_ERROR_NETWORK
13. AUDIO_RENDERER_ERROR: audio render error
14. Source create failed
15. TypeError: can't access property "indexOf", t is undefined
16. NS_ERROR_FAILURE (0x80004005)

Can someone tell me where to find error code or error types

johnBartos commented 8 months ago

"No playable formats" means that the browser does not support any of qualities listed in the HLS playlist. We're delivering AVC/h264 streams which have wide support, so on a normal computer/browser you shouldn't see this. However, Chromium browsers without proprietary software installed will not work because there is no h264 decoder. If you're using Chromium, you can turn that on with a flag: https://groups.google.com/a/chromium.org/g/chromium-dev/c/9EqnUb2fDvg.

If you're not using Chromium, what it sounds like to me is that one of your packages is intercepting and rewriting the HLS playlist. Failed to parse HLS master playlist invalid content type: application/octet-stream is weird because the HLS playlist should have the application/vnd.apple.mpegurl mime type. If you're not using an IVS HLSstream, unfortunately I can't help you with that.

SanskarDahiya commented 8 months ago

Hi @johnBartos

Thanks for your support. It really help me to decode the issues.

There are a lot of more error message I'm getting from IVS Player..

I would appreciate, if you spare your time & help me to understand these.. According to me, These all are browser specific errors... As on Chrome browser I'm getting few errors not all.

1. Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp4;codecs="avc1.42001e"') is unsupported.
2. Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp4;codecs="mp4a.40.2"') is unsupported.
3. TypeError: t is undefined
4. DECODER_ERROR_NOT_SUPPORTED: audio decoder initialization failed
5. Unsupported source type
6. The MediaSource was closed upon opening
7. MediaSource.addSourceBuffer: Can't play type
8. t.headers is undefined
9. No playable format
10. PIPELINE_ERROR_DECODE
11. PIPELINE_ERROR_DECODE: video decoder reinitialization failed
12. PIPELINE_ERROR_NETWORK
13. AUDIO_RENDERER_ERROR: audio render error
14. Source create failed
15. TypeError: can't access property "indexOf", t is undefined
16. NS_ERROR_FAILURE (0x80004005)