oralodabas / google-cast-sdk

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

The getCurrentTimeSec function missing from cast.receiver.media.Player interface documentation #386

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a JS Object that adheres to the cast.receiver.media.Player interface 
(https://developers.google.com/cast/docs/reference/receiver/cast.receiver.media.
Player)
2. Create a receiver that uses the new Player implementation
3. Play media

What is the expected output? What do you see instead?
cast_receiver.js is throwing an undefined function error every playhead update.

What version of the product are you using? On what operating system?
Chrome Sender v1 -> Custom Receiver 2.0.0

Please provide any additional information below.
Adding a function named "getCurrentTimeSec" to the Player implementation 
resolves the issue

Original issue reported on code.google.com by casey.oc...@gmail.com on 25 Sep 2014 at 10:06

GoogleCodeExporter commented 9 years ago
Could you provide the console log? Thanks.

Original comment by christia...@google.com on 26 Sep 2014 at 6:31

GoogleCodeExporter commented 9 years ago
Uncaught TypeError: undefined is not a function cast_receiver.js:formatted:2030
  Bc cast_receiver.js:formatted:2030
  Z.cb cast_receiver.js:formatted:2065
  g.Ab cast_receiver.js:formatted:2126
  Z.Q cast_receiver.js:formatted:1934
  U.Ia cast_receiver.js:formatted:1135
  Lb cast_receiver.js:formatted:855 
  Q.dispatchEvent cast_receiver.js:formatted:826
  g.Q cast_receiver.js:formatted:1065
  Lb cast_receiver.js:formatted:855
  Q.dispatchEvent cast_receiver.js:formatted:826
  g.Q cast_receiver.js:formatted:933

Uncaught TypeError: undefined is not a function cast_receiver.js:formatted:2039
  Z.Qa

Original comment by casey.oc...@gmail.com on 27 Sep 2014 at 12:41

Attachments:

GoogleCodeExporter commented 9 years ago
You are using a custom receiver I believe. Try using our Default/Styled 
receivers and you'll notice those exceptions do not happen. That particular 
method is defined and the issue is somewhere else in your code. 

Original comment by anad...@google.com on 27 Sep 2014 at 5:22

GoogleCodeExporter commented 9 years ago
The default and styled receivers do not meet our business requirements. Our 
Google representative told us specifically to create a custom receiver. We were 
pointed to the following documentation: 

https://developers.google.com/cast/docs/custom_receiver
https://developers.google.com/cast/docs/release-notes
https://developers.google.com/cast/docs/reference/receiver/cast.receiver.media.P
layer

From the release notes:

"New Player interface ( cast.receiver.media.Player) to simplify porting players 
in scenarios with legacy code where the existing player does not provide direct 
access to the HTML5 media element. The Media Manager constructor can now be 
passed either a HTMLMediaElement or a cast.receiver.media.Player object"

We have implemented the cast.receiver.media.Player interface, but we're seeing 
the errors described above. When we add a function "getCurrentTimeSec" to our 
implementation, the error goes away. No where in the documentation does it say 
that this function is needed.

Original comment by casey.oc...@gmail.com on 29 Sep 2014 at 1:51

GoogleCodeExporter commented 9 years ago
My bad, you are correct; the list of interface methods should have had that 
method listed for implementers to implement, too. I changed this issue to 
Accepted and once the documentation is updated, I will change that to fixed. 
Meanwhile, you are on the right track to implement it.

Original comment by anad...@google.com on 29 Sep 2014 at 5:10

GoogleCodeExporter commented 9 years ago
This has been fixed already

Original comment by anad...@google.com on 9 Dec 2014 at 4:39