mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 14:52:13 +00:00
get cast device from chromecast transport
This commit is contained in:
parent
1edf6484d8
commit
d770b5572a
1 changed files with 7 additions and 2 deletions
|
|
@ -228,8 +228,13 @@ function ChromecastTransport() {
|
|||
this.getSessionState = function() {
|
||||
return cast.framework.CastContext.getInstance().getSessionState();
|
||||
};
|
||||
this.getCurrentSession = function() {
|
||||
return cast.framework.CastContext.getInstance().getCurrentSession();
|
||||
this.getCastDevice = function() {
|
||||
const session = cast.framework.CastContext.getInstance().getCurrentSession();
|
||||
if (session !== null) {
|
||||
return session.getCastDevice();
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue