My media host is using JSONP to embed videos. I embed this script, along with a few others, in order to embed videos. My understanding is that it's using JSONP in order to overcome CORS issues.
What I do not understand is the last line of the script.
window['wistiajsonp-/embed/medias/8up1lc9606.jsonp'] = window['wistiajsonp-/embed/medias/8up1lc9606.jsonp'];
window['wistiajsonp-/embed/medias/8up1lc9606.jsonp'] = {
"media": {
"assets": [{
"type": "original",
"slug": "original",
"display_name": "Original file",
"width": 1920,
"height": 1080,
"ext": "mp4",
"size": 109515791,
"bitrate": 16127,
"public": true,
"status": 2,
"progress": 1.0,
"url": "https://embed-ssl.wistia.com/deliveries/9b53a11c8a871733aadd479d26a10d4555de2d66.bin",
"created_at": 1522785172
}, {
"type": "still_image",
"slug": "still_image_1920x1080",
"display_name": "Image",
"width": 1920,
"height": 1080,
"ext": "jpg",
"size": 216848,
"bitrate": 0,
"public": true,
"status": 2,
"progress": 1.0,
"url": "https://embed-ssl.wistia.com/deliveries/bf2cc0bf9de369545df9c9fa8be8371ab8b12f56.bin",
"created_at": 1522785744
}],
"options": {}
};
window['wistiajsonp-/embed/medias/8up1lc9606.jsonp'] = window['wistiajsonp-/embed/medias/8up1lc9606.jsonp'];
(Redacted for the sake of brevity)
Regarding the linked question: I am not talking about Swift; I am talking about JavaScript. Secondly, what I'm asking is directed at the purpose, not the implementation of such "self-assignment".