This guide covers significant changes made for TOP in the 1.2.0-rc.1 release:
TOP before 1.2.0-rc.1 must update items specified hereSome breaking changes were made in version 1.2.0-rc.1. Anyone using version 1.1.0 and lower will need to make minor updates. The breaking changes are the following:
This only applies to you if you were listening to the cueStateChanged event
Prior to 1.2.0-rc.1, when a cueStateChanged event is fired, the name of the state which a cue is changing from is oldState:
var player = TOP.createAndInitPlayer({
events : {
cueStateChanged: function(result) {
console.log('[cueStateChanged] changing from state:', result.oldState);
}
}
});In 1.2.0-rc.1, oldState has been normalized to previousState to conform to the naming convention used in all other state changed events:
var player = TOP.createAndInitPlayer({
events : {
cueStateChanged: function(result) {
console.log('[cueStateChanged] changing from state:', result.previousState);
}
}
});Included in 1.2.0, we have deprecated the usage of listenFor() methods on event collections. Instead, the listen() method now supports both a function argument as well as an event map.
You can simply swap usage of listenFor(map) -> listen(map)