message (2)
message (2)
api.get({url: `/applications/public?application_ids=$
{applicationId}`}).then(res => {
const appData = res.body[0]
const exeName = appData.executables.find(x => x.os ===
"win32").name.replace(">","")
FluxDispatcher.unsubscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
}
}
FluxDispatcher.subscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
let realFunc =
ApplicationStreamingStore.getStreamerActiveStreamMetadata
ApplicationStreamingStore.getStreamerActiveStreamMetadata = () => ({
id: applicationId,
pid,
sourceName: null
})
ApplicationStreamingStore.getStreamerActiveStreamMetadata =
realFunc
FluxDispatcher.unsubscribe("QUESTS_SEND_HEARTBEAT_SUCCESS",
fn)
}
}
FluxDispatcher.subscribe("QUESTS_SEND_HEARTBEAT_SUCCESS", fn)
while(true) {
const res = await api.post({url:
`/quests/${quest.id}/heartbeat`, body: {stream_key: streamKey, terminal: false}})
const progress = res.body.progress.PLAY_ACTIVITY.value
console.log(`Cookie progress: ${progress}/$
{secondsNeeded}`)