ROKU SDK Changelog
==================

Version 1.8-13
-------------

- Fix VastAd constructor crash when Creative contains no child element

Version 1.8-12
-------------

- Fix implementation of GetContentPositionForPlayhead and GetPlayheadPositionForContent in
  YSVODSession to correctly check for advert type using a string comparison, not an enum type
- Fix expiring of timeline elements in YSTimeline.brs (remove goto statement)
- Add an additional check in YSAdBreak when obtaining duration to ensure durations of the
  individual adverts are valid before adding to the cumulative duration
- Update sample app to prevent CMAF metadata from being treated as ID3
- Cleanup demo XML files to use correctly-cased filenames and "assocarray" instead of 
  "roAssociativeArray" for field types
- Add a guard in YSLivePauseSession.brs in ys_yslps_rebuildtimeline to ensure that the
  stream extension exists before trying to extract PDT start/end timing information
- Modify SDKOps example component to add a new isLivePause field
- Modify demo app to detect isLivePause differently depending on whether task mode selected
- Modify demo app to ensure it sets the HUD offset when in task mode
- Modify behaviour of PerformSeek in demo app to handle case where position is before the DVR start

Version 1.8-11
-------------

- Support multiple <Error> URLs in adverts.

Version 1.8-10
-------------

- Fixed an issue that prevented the timeline from being updated while playback was paused.

Version 1.8-9
-------------

- Fixed an issue with handling empty or missing offset attribute in progress Tracking tag
- Fixed a thread conflict while firing RAF beacons in YORokuTasks

Version 1.8-8
-------------

- Enabled RAF debug output

Version 1.8-7
-------------

- Fixed issues with error handling in VMAP and playlist parsers

Version 1.8-6
-------------

- Added support for Companion Ads (VASTCompanion)

Version 1.8-5
-------------

- Modified SetUseRAF in YORokuTasks to only call enableAdMeasurements if the Roku_Ads interface exists
- Added additional trace in YSLiveSession to aid ID3/EMSG debugging
- Modified storage of deferred metadata to occur prior to calling for the next analytics poll

Version 1.8-4
-------------

- Modified the HLS manifest parser to support CDN Proxy workflow

Version 1.8-3
-------------

- Modified handling of tracking URLs to ensure they are stripped of pre-/post- spaces
- Modify handling of non-linear breaks to allow empty non-linear breaks too
- Fix typo in ys_yslps_processanalytics and ys_ysvs_processanalytics (Change response to response.content)

Version 1.8-2
-------------

- Modified search behaviour for missed breaks as only the first break was being checked.

Version 1.8-1
-------------

- Remove double-encoding of tracking URLs (only macros are URL encoded now)
- Fix typo in YSLiveSession relating to NonLinearBreaks (change "old_olb_count" to "old_nlb_count")
- Fix typo in YSLiveSession relating to breaks (change "brks" to "brk")
- Fix detection of empty VMAP break in Live Sessions
- Added reference code for managing EMSG tags

Version 1.8-0
-------------

- New callback added (NonLinearsUpdated) to signal to app that new non-linear breaks arrived
- New methods on YSSession: GetNonLinearBreaks() and RemoveNonLinearBreak()
- New methods on YSSession: ReportNonLinearBreakEvent() and ReportNonLinearAdvertEvent()

Version 1.5-5
-------------

- Fix to ensure that YORokuTasks loader does not crash on timeout

Version 1.5-4
-------------

- Added support for obtaining break position from YSAdBreak instances (getPosition)
- Modified UrlLoader component in sample app to provide support for RAF from within a separate Task
- Modified YORokuTasks to not instantiate RAF when separate Task is being used

Version 1.5-3
-------------

- Added support to both task-based and non-task-based loaders to detect 302 redirects (for edge balancer and vod proxy support)

Version 1.5-2
-------------

- Moved URIEncoding to the Tracking.brs file so that this is handled closer to its generation point
  (and critically before moving into RAF's undocumented format)
 - Bump version in YSSessionManager

Version 1.5-1
-------------

- Added additional methods for Nielsen: setNielsenGenre and setNielsenAppId
- URL encode all tracking beacons prior to sending to RAF as it seems RAF no longer 
  validates input provided to it but instead rejects anything it doesn't consider acceptable?

Version 1.5-0
-------------

- Added support for YSLivePauseSession (incl. YSSessionManager.createForLivePause)
- Added ability to toggle RAF on and off (GetGlobalAA().taskman object has GetUseRAF and SetUseRAF)
- Tweaked RAF implementation to clean up impression vs creativeView
- Break end timer no longer set in the session if there is no break active

Version 1.4-4
-------------

- Fixed return value type when URL load fails (in VOD session)

Version 1.4-3
-------------

- Added new methods to YSVODSession - GetContentPositionForPlayhead and GetPlayheadPositionForContent

Version 1.4-2
-------------

- Added MAKE_SDK_TASK guard in HomeScene.brs during AdvertStart handler
- Additional checks for null/invalid added to SDKOps.brs (AdBreakStart, AdvertStart)
- YSLiveSession.brs (ys_ysls_handlemetadata) now allows for non-existent break instance
- YSSession.brs (ys_yss_breakstart, ys_yss_breakend) now correctly handles non-existent break instance
- Destroy() method was missing in YOPoller - have reinstated it

Version 1.4-1
-------------

- Corrected typo (timeline vs timelint) in YSSession
- Modified timeout of break handling to prevent "uninitialized variable" error
- Added cached metadata processing to Live Session

Version 1.4-0
-------------

- Added new YSDebugLog class to handle all logging from the SDK in a consistent way
- Added conditional compilation (MAKE_SDK_TASK) to sample app to allow using the SDK in a separate thread instead of the render thread
- Modified buffering detection to be more reliable in the sample app
- SessionReady callback no longer takes a single parameter, but instead receives an AA to get better status info
- Added YSSessionResult and YSSessionStatus classes to aid with checking status info
- URLLoader now checks for errors in the entire range (outside 200-399) instead of simply "not 200"
- AdBreak now assumes invalid state initially instead of valid (until parsed)
- Added GetStartPDT and GetEndPDT to extensions (for later support of LivePause)
- Tracking class modified so that it can read tracking from VMAP also
- Modified YORokuTasks so that they can deliver failure notifications too
- Added new AdvertLineage property to VastAd instances
- Added GetCreativeId() to VASTCreative instances (and ancestors)
- VASTLinear now has a GetSkipOffset() method
- VASTNonLinear instances now contain an array of ALL of their attributes (GetAttributes() method)
- Initialisation of the SDK is somewhat more robust now and checks the responses more closely
- Added new player event reports "reportLinearEvent" and "reportNonLinearEvent" to YSAdvert
- PingWatchdog() in YSAdvert now returns fired beacons for informational purposes
- Added support for "Enhanced Analytics" (yo.av=2) to aid support for slot impressions
- Added implementation of break slot impressions (including missed replacement opportunities)
- Improved the handling of cached metadata on playback startup
- AdBreakStart and AdBreakEnd now deliver YSAdBreak instances
- Session initialisation significantly reworked and now reads information from the manifest instead of making a session call
- DASH initialisation no longer uses Location attribute to determine analytics, but reads custom attribute instead
- Added conditional compilation (USE_LOADER_TASK) to disable use of separate URLLoader task (when running in a separate task already)
- Removed stray "stop" stmt from rtGeneral.brs

Version 1.3-1
-------------

- Corrected typo in YSSessionManager which meant that resume events were not being tracked

Version 1.3-0
-------------

- Replaced the implementation of the Class system so that calls to eval() are no longer required (as this is now being forcibly deprecated by Roku)
- Limited support for Roku Ads Framework added
- Demo app updated to support ID3 in Live (as this now works on Roku)

Version 1.2-2
-------------

- Add ability to suppress analytics calls on demand
- Fixed a couple of typos

Version 1.2-1
-------------

- Ensure break end timer is cancelled on buffering
- Clear duplicate ID3 tag check on deferred tag handling
- Fix typo to ensure AdBreakEnd handler is correctly checked (was AdBreakStart)

Version 1.2-0
-------------

- Documentation added to members in Core/AdBreak.brs
- Documentation added to members in Core/Extension.brs
- Fixed up some documentation issues in Core/Tracking.brs
- Documentation added to members in Core/VastLinear.brs
- Documentation added to members in Core/VastNonLinear.brs
- Documentation added to members in Parsers/ParsePlaylist.brs
- Documentation added to members in Parsers/ParseVAST.brs
- Documentation added to members in Parsers/ParseVMAP.brs
- Documentation added to members in Public/YSAdvert.brs
- Documentation added to members in Public/YSTimeline.brs
- Destroy() methods added throughout where needed
- Timecode handling functions moved to generic location
- new AddTracking() method added to Core/Tracking.brs
- Added expiry check to tracking events
- Tracking of progress-based VAST events added
- YO:ACTUAL_DURATION macro support added to Core/VastCreative.brs
- Media src url was not set in Core/VastLinear.brs - fixed
- Unneeded GetPoints() method removed from Core/VastLinear.brs
- Typos in Core/VastNonLinear.brs corrected which prevented target medias being retrieved
- Changed initial value of ads property in ParseVAST class
- Additional validation of VMAP extensions during parsing in ParseVMAP
- Regex improvement in YSAdvert for extracting ids
- Added check for IsPaused() in YSAdvert during watchdog ping
- Correctly extracting break duration and passing through to tracking in YSAdvert
- Correctly extracting asset name for tracking and passing through
- New GetCurrentBreak / GetCurrentBreaks added to YSLiveSession
- Live Session now stores deferred ID3 tags and processes them when VAST received
- End of Advert/Break discrimination now improved
- No longer processing metadata tags which appear out-of-sequence
- Additional duration checks added to ensure adverts and breaks complete correctly
- Helper for GetLinearClickThrough() added to YSSession.brs
- Improvements made to YSTimeline to support upcoming LivePause functionality
- Added GetTotalDuration() to YSTimeLine class
- Calculation of Timeline updates algorithm improved
- Improvements made to YORokuTasks to handle failure more robustly and prevent queue lock-up

