mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-13 20:31:48 +00:00
cast session prop added
This commit is contained in:
parent
7a806d930a
commit
1bb77baade
1 changed files with 13 additions and 1 deletions
|
|
@ -37,7 +37,8 @@ function Chromecast() {
|
|||
function onCastStateChanged() {
|
||||
events.emit(cast.framework.CastContextEventType.CAST_STATE_CHANGED);
|
||||
}
|
||||
function onSesstionStateChanged(event) {
|
||||
function onSesstionStateChanged() {
|
||||
events.emit(cast.framework.CastContextEventType.SESSION_STATE_CHANGED);
|
||||
}
|
||||
function onStateChanged() {
|
||||
if (active) {
|
||||
|
|
@ -139,6 +140,17 @@ function Chromecast() {
|
|||
|
||||
return cast.framework.CastContext.getInstance().getCastState();
|
||||
}
|
||||
},
|
||||
castSession: {
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
if (!castAPIAvailable) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return cast.framework.CastContext.getInstance().getCurrentSession();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue