Unexpected connected message for already connected

2019-08-14 06:00发布

问题:

I'm developing a custom cast receiver based on Cast-Player-Sample. I'm getting "Unexpected connected message for already connected sender" and "Unexpected sender already registered". Why? I can't figure it out why I'm getting this.

How can I track this down? What is triggering this?

More screen shots comparing mine version with Cast-Player-Sample:

Mine

Sample

回答1:

I think I figured it out. I used the player.js code from Cast-Player-Sample without modifying anything and I still would see "Unexpected connected message for already connected sender" error.

The problem is that I add <video> html tag programmatically and that is causing this error (as it seems). Once I removed the code to fetch the partial template and append it to <body> the error disappear.

But why that happens I don't know... I wish I could add partial template programmatically...