nuuyoo / google-cast-sdk

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

Google cast receiver throwing "Uncaught NotSupportedError: Failed to execute 'addSourceBuffer' on 'MediaSource' #613

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Establish a connection to google cast with our android app - (Receiver app 
gets open on TV)
2. start playing the content from android app.
3.

What is the expected output? What do you see instead?
It should start playing the content as it was playing couple of days back.

We have successfully launched with chromecast support on our app and it was 
perfectly working fine, from the past few days it suddenly stopped working(the 
receiver was alway sending the buffering status to sender and it was 
continuously buffering), i have used the chrome debugging and able to find this 
exception in console "Uncaught NotSupportedError: Failed to execute 
'addSourceBuffer' on 'MediaSource': The type provided ('video/mp2t; 
codecs="mp4a.40.2,avc1.77.31"') is unsupported." in the media_player.js file 
(on the 80th line - according to chrome debugger). not able to understand why 
suddenly this error is thrown, all our customers started complaining that 
chromecast support is not working.

can you please guide me through the problem.

Note: I have used the custom receiver sample from google cast github and 
modified the styling.

we are using HLS for streaming videos: here is the sample m3u8 file content:

#EXTM3U
#EXT-X-VERSION:1
## Created with Unified Streaming Platform(version=1.6.9)
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=323376,CODECS="mp4a.40.2,avc1.77.31",RE
SOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=174000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=510996,CODECS="mp4a.40.2,avc1.77.31",RE
SOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=351000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=722996,CODECS="mp4a.40.2,avc1.77.31",RE
SOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=551000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1078096,CODECS="mp4a.40.2,avc1.77.31",R
ESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=886000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1415176,CODECS="mp4a.40.2,avc1.77.31",R
ESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=1204000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1743776,CODECS="mp4a.40.2,avc1.77.31",R
ESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=1514000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2068136,CODECS="mp4a.40.2,avc1.77.31",R
ESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=1820000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2498496,CODECS="mp4a.40.2,avc1.77.31",R
ESOLUTION=1024x576
707eb5bd-dcdf-4f84-b1a3-7cdbd0d4af89-audio=131072-video_eng=2226000.m3u8
I did saw answer to this post: Is avc1.66.31,mp4a.40.2 supported by the 
Chromecast device? but as we have different version of avc codec - avc1.77.31 
don't know, what's the best way to get it working.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by ramakant...@gmail.com on 12 Jul 2015 at 5:48

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The same m348 file, which i have copy pasted here was working few days back, 
seeing this problem around 6th or 7th of july. users were able to cast the 
movies with our app.

again want to mention that saw the similar kind of query on stackoverflow 
http://stackoverflow.com/questions/31256129/is-avc1-66-31-mp4a-40-2-supported-by
-the-chromecast-device and issue no 609.

tried adding this code to player.js file :
 host.processManifest = function(manifest) {
    return manifest.replace(/CODECS=\"avc1.77.([0-9]*)/g, 'CODECS=\"avc1.66.30');
  };

but the problem still exists.

Thanks,
Ramakanth.G

Original comment by ramakant...@gmail.com on 12 Jul 2015 at 6:45

GoogleCodeExporter commented 8 years ago

Original comment by jonathan...@google.com on 14 Jul 2015 at 8:40

GoogleCodeExporter commented 8 years ago
Do you still see the issue when you use 'CODECS=\"avc1.77.30' instead of 
'CODECS=\"avc1.66.30'?

Original comment by jonathan...@google.com on 14 Jul 2015 at 8:50

GoogleCodeExporter commented 8 years ago
Closing this ticket since the Stack Overflow question associated with it 
(http://stackoverflow.com/questions/31355360/google-cast-receiver-throwing-uncau
ght-notsupportederror-failed-to-execute-ad) has accepted the answer that 
proposes the same solution.

Original comment by jonathan...@google.com on 16 Jul 2015 at 4:29