Tizen 2016 TV's throw TypeError: JSON.stringify cannot serialize cyclic structures #935
Labels
platform: TV/STB
Issues affecting smart TV or set-top box platforms
status: archived
Archived and locked; will not be updated
type: enhancement
New feature or request
Milestone
In ConfigUtils.cloneObject, Shaka clones objects by doing
JSON.parse(JSON.stringify(arg))
.In PlayheadObserver.cloneTimelineInfo_, Shaka clones a TimelineRegionInfo using ConfigUtils.cloneObject. There is even a helpful comment saying:
On Tizen 2016 TV's, it appears that this is not the case. JSON.stringify will attempt to serialize cyclic structures (the DOM element), and throws a TypeError as a result.
Fwiw 2016 TV's report this navigator.userAgent string:
Mozilla/5.0 (SMART-TV; Linux; Tizen 2.4.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/2.4.0 TV Safari/538.1
I don't mind putting together a PR to address this. Perhaps a different cloneObject implementation is warranted? One which detects circular structures and compensates? I'm open to suggestions.
The text was updated successfully, but these errors were encountered: