Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errorcode: 51 upon requestSession #42

Open
SergejKasper opened this issue Jan 6, 2015 · 2 comments
Open

Errorcode: 51 upon requestSession #42

SergejKasper opened this issue Jan 6, 2015 · 2 comments

Comments

@SergejKasper
Copy link

Hi!
Thanks for bringing chromecast to Cordova.
I'm having problems getting a Session though.
Upon the extecution of the function chrome.cast.requestSession(), an error with the code 51 is thrown.
I'm looking forward to your help. Thank you!

alert('CAST available:' + chrome.cast.isAvailable); //returns true

new chrome.cast.SessionRequest(chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID);

var apiConfig = new chrome.cast.ApiConfig(sessionRequest, function(session) {
    alert('CAST: Session initialised'); 
}, function(available) {
    alert('CAST: Reciever?' + (chrome.cast.ReceiverAvailability.AVAILABLE === available));
});

if (!chrome.cast || !chrome.cast.isAvailable) {
  setTimeout(chrome.cast.initialize(apiConfig, 
    function() {
      alert('initialize done');
    }, function(err) {
      alert('initialize error', err);
    }),3000);
}

chrome.cast.requestSession(function(session) {
      //some code
   }, function(err) {
     console.log('request session error', err); // <--- Error thrown
  });
@Vaporexpress
Copy link
Contributor

Hi.
Look at this initialization example:
https://github.com/googlecast/CastVideos-chrome/blob/master/CastVideos.js#L136

@gladsonrobinson89
Copy link

Same error. Please let me know if you got the answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants