Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Commit

Permalink
Feat: added set status methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed May 31, 2018
1 parent 6c36b88 commit 40dfcb9
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion src/coreHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import {
IMOSItem,
IMOSROReadyToAir,
IMOSROFullStory,
MosDuration
MosDuration,
IMOSObjectStatus
} from 'mos-connection'

import * as _ from 'underscore'
Expand Down Expand Up @@ -296,6 +297,45 @@ export class CoreMosDeviceHandler {
throw err
})
}
setROStatus (roId: string, status: IMOSObjectStatus): Promise<any> {
// console.log('setStoryStatus')
return this._mosDevice.setRunningOrderStatus({
ID: new MosString128(roId),
Status: status,
Time: new MosTime()
})
.then((result) => {
// console.log('got result', result)
return result
})
}
setStoryStatus (roId: string, storyId: string, status: IMOSObjectStatus): Promise<any> {
// console.log('setStoryStatus')
return this._mosDevice.setStoryStatus({
RunningOrderId: new MosString128(roId),
ID: new MosString128(storyId),
Status: status,
Time: new MosTime()
})
.then((result) => {
// console.log('got result', result)
return result
})
}
setItemStatus (roId: string, storyId: string, itemId: string, status: IMOSObjectStatus): Promise<any> {
// console.log('setStoryStatus')
return this._mosDevice.setItemStatus({
RunningOrderId: new MosString128(roId),
StoryId: new MosString128(storyId),
ID: new MosString128(itemId),
Status: status,
Time: new MosTime()
})
.then((result) => {
// console.log('got result', result)
return result
})
}
test (a: string) {
return new Promise(resolve => {
setTimeout(() => {
Expand Down

0 comments on commit 40dfcb9

Please sign in to comment.