KirovBvulgaru / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Uncaught TypeError: Cannot read property 'codecs' of undefined with HLS and Media Player library #135

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This appears to be a new issue as of this afternoon. Not sure if maybe there 
was a revision bump to the Media Player library recently.

When loading the attached m3u8 (2250.m3u8, or any other m3u8 without multiple 
bandwidths), the Media Player library throws "Uncaught TypeError: Cannot read 
property 'codecs' of undefined".

Unfortunately, the source is minified and there are no source maps enabled, but 
using Chrome's pretty-print feature, I can see that the error comes from line 
3570 of the prettified media_player.js. Specifically, the error occurs here:

`this.codecs = a.v[0].codecs;`

Here, `a.v` is an empty array. This seems not to be the case when I load any 
m3u8 with multiple bandwidths (like the attached index.m3u8), in which case the 
`a.v` array is populated with one object per representation.

Apologies for the lack of better details, but a without source maps or an 
unminified version of the code it's pretty difficult to track things down.

Original issue reported on code.google.com by kenni...@gmail.com on 11 Feb 2014 at 8:56

Attachments:

GoogleCodeExporter commented 8 years ago
We made an update today so that might be the cause; we are looking into it. 
Thanks for reporting. 

Original comment by anad...@google.com on 11 Feb 2014 at 9:16

GoogleCodeExporter commented 8 years ago
Can you share URL of manifest that made this error?

I cannot reproduce this problem with given manifest file. 

Latest media_player.js is supposed to remove audio streams from the manifest 
mixed with audio and audio/video codecs. Given error can happens, if all 
streams are removed from manifest. I need to understand how such a case happen.

Original comment by kjy...@google.com on 11 Feb 2014 at 9:59

GoogleCodeExporter commented 8 years ago
Or it can happen when manifest file has no streams from the beginning.

Original comment by kjy...@google.com on 11 Feb 2014 at 10:07

GoogleCodeExporter commented 8 years ago
Unfortunately, I can't put the stream URL up on a publicly accessible page. I'd 
be more than happy to provide you with the URL if you want to email me though. 
kennis84 at gmail

Thanks.

Original comment by kenni...@gmail.com on 11 Feb 2014 at 10:11

GoogleCodeExporter commented 8 years ago
We can reproduce the problem and will fix it as soon as possible.

Original comment by vadi...@google.com on 11 Feb 2014 at 10:24

GoogleCodeExporter commented 8 years ago
Thank you for reporting this issue. The fix has been propagated to

http://www.gstatic.com/cast/sdk/libs/mediaplayer/0.3.0/media_player.js

Original comment by vadi...@google.com on 12 Feb 2014 at 2:13

GoogleCodeExporter commented 8 years ago

Original comment by anad...@google.com on 12 Feb 2014 at 2:46