Digideck Live Service
The Digideck Live Service provides methods related to our Digideck Live System
Methods
isDigideckLiveEnabled()
Description
- Returns a
trueorfalsevalue depending if Digideck Live is enabled.
Return Value: Boolean
Code Example
this.isDigideckLiveEnabled = digideckCore.digideckLiveService.isDigideckLiveEnabled();
onRoomJoined(callback)
Description
- This subscribes to the
ddLiveRoomJoinedevent. The callback is invoked when a room is joined.
Return Value: null
Options:
callback: FunctionInvoked getting passed room data when a user joins a room.
Code Example
digideckCore.digideckLiveService.onRoomJoined((roomData) => {
// roomData Signature
{
member: Object
roomName: String,
socketId: String,
username: String
}
// member Signature
{
contact: Object, // form data of user joining
externalReferenceId: String,
isPresentationOwner: Boolean,
presentationId: String,
roomId: String,
roomMemberCount: Number,
roomName: String,
socketId: String,
socketReconnected: Boolean,
username: String
}
});
onUnreadMessageCountChange(callback)
Description
- Runs a provided callback when the amount of unread messages from DIGIDECK LIVE changes.
Code Example
digideckCore.digideckLiveService.onUnreadMessageCountChange((e, data) => {
console.log(data.messageCount);
});
offUnreadMessageCountChange(callback)
Description
- Unsubscribes a callback function to the
ddLiveUnreadMessageCountChangeevent.
Code Example
digideckCore.digideckLiveService.offUnreadMessageCountChange(this.refToOnUnreadMessageCountChangeFunction);
offRoomJoined(callback)
Description
- This unsubscribes from the
ddLiveRoomJoinedevent.
Return Value: null
Options:
callback: Functionthis callback is the reference to the subscription and is used to unsubscribe.
Code Example
digideckCore.digideckLiveService.offRoomJoined(callback);
onCobrowsingNavigation(callback)
Description
- This subscribes to the
cobrowsingNavigationevent. The callback is invoked when cobrowsing occurs.
Return Value: null
Options:
callback: FunctionInvoked when a cobrowsing navigation event occurs.
Code Example
digideckCore.digideckLiveService.onCobrowsingNavigation((cobrowsingEvent) => {
// cobrowsingEvent Structure
{
currentTarget: Document,
data: Object,
delegateTarget: Document
handleObj: Object
isTrigger: Number
namespace: String
namespace_re: String,
target: Document
timeStamp: Number
type: String
}
// handleObj Structure
{
data: Object,
guid: Number,
handler: Function,
namespace: String,
needsContext: Boolean,
origType: String,
selector: String,
type: String,
}
});
offCobrowsingNavigation(callback)
Description
- This unsubscribes from the
cobrowsingNavigationevent.
Options:
callback: Functionthis callback is the reference to the subscription and is used to unsubscribe.
Code Example
digideckCore.digideckLiveService.offCobrowsingNavigation(callback);
toggleDdLiveInterface()
Description
- Toggles the DIGIDECK LIVE interface on/off depending on its current state.
Code Example
digideckCore.digideckLiveService.toggleDdLiveInterface();
getDdLiveConfig()
Description
- Gets all DIGIDECK LIVE settings.
Return Value: Object: with data attr key/value pairs.
Code Example
digideckCore.digideckLiveService.getDdLiveConfig();
getDdLiveDataAttribute()
Description
- Gets a specified data-attribute from the the #dd-live element.
Return Value: Any: Value of data-attribute.`
Code Example
digideckCore.digideckLiveService.getDdLiveDataAttribute();