Skip to content

Support __onGCastApiAvailable #51

@Lindsay-Needs-Sleep

Description

@Lindsay-Needs-Sleep

It would be nice if we could implement chrome Api's method of signalling that the api is available.

In Chrome desktop you do:

window['__onGCastApiAvailable'] = function(isAvailable, err) {
  if (isAvailable) {
    // start using the api
  }
};

But in cordova-plugin-chromecast you do:

document.addEventListener("deviceready", function () {
    // start using the api
});

Would be nice to conform a bit more because:

  • less difference between our usage and chrome's = less documentation we have to write and maintain. :D
  • Allows identical code to be ported between web and cordova
    • (This happens to be my use-case. We use a remote web server which works from desktop and cordova.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions