local globe = asset.require("../../jupiter")



local data = asset.syncedResource({
  Name = "Jupiter Video Layer",
  Type = "HttpSynchronization",
  Identifier = "jupiter_videos",
  Version = 1
})


local Layer = {
  Identifier = "JupiterVideo",
  Video = data .. "/jupiter_movie_3600.mp4",
  Name = "Jupiter Video",
  Enabled = true,
  Type = "VideoTileLayer"
}


asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globe.Jupiter.Identifier, "ColorLayers", Layer)
end)

asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globe.Jupiter.Identifier, "ColorLayers", Layer)
end)

asset.export("layer", Layer)



asset.meta = {
  Name = "Jupiter Video",
  Version = "1.0",
  Description = "An video showing Jupiter.",
  Author = "NOAA",
  URL = "https://sos.noaa.gov/copyright/",
  License = "No License"
}
