ReadyPlayer2 / nasa-playgrounds

React application to call the NASA APOD API and display returned images and videos
MIT License
2 stars 0 forks source link

Support media_type=video #20

Closed ReadyPlayer2 closed 5 years ago

ReadyPlayer2 commented 5 years ago

An example response containing a video:

{
        "copyright": "Jean-Luc DauvergneCiel et Espace Music: Space-Music",
        "date": "2014-10-05",
        "explanation": "If the full Moon suddenly faded, what would you see? The answer during the total lunar eclipse of 2011 June was recorded in a dramatic time lapse video from Tajikistan. During a total lunar eclipse, the Earth moves between the Moon and the Sun, causing the moon to fade dramatically. The Moon never gets completely dark, though, since the Earth's atmosphere refracts some light. As the above video begins, the scene may appear to be daytime and sunlit, but actually it is a nighttime and lit by the glow of the full Moon. As the moon becomes eclipsed and fades, the wind dies down and background stars can be seen reflected in foreground lake. Most spectacularly, the sky surrounding the eclipsed moon suddenly appears to be full of stars and highlighted by the busy plane of our Milky Way Galaxy. The sequence repeats with a closer view, and the final image shows the placement of the eclipsed Moon near the Eagle, Swan, Trifid, and Lagoon nebulas. Nearly two hours after the eclipse started, the moon emerged from the Earth's shadow and its bright full glare again dominated the sky.  The next total lunar eclipse will occur this Wednesday.    APOD Wall Calendar: Moons and Planets",
        "media_type": "video",
        "service_version": "v1",
        "title": "A Total Lunar Eclipse Over Tajikistan",
        "url": "//player.vimeo.com/video/25808333?title=0&byline=0&portrait=0"
    }
ReadyPlayer2 commented 5 years ago

Another, this time linking to YouTube:

{
        "date": "2018-04-09",
        "explanation": "One of the most spectacular solar sights is an explosive flare. In 2011 June, the Sun unleashed somewhat impressive, medium-sized solar flare as rotation carried active regions of sunpots toward the solar limb. That flare, though, was followed by an astounding gush of magnetized plasma -- a monster filament seen erupting at the Sun's edge in this extreme ultraviolet image from NASA's Solar Dynamics Observatory. Featured here is a time-lapse video of that hours-long event showing darker, cooler plasma raining down across a broad area of the Sun's surface, arcing along otherwise invisible magnetic field lines. An associated coronal mass ejection, a massive cloud of high energy particles, was blasted in the general direction of the Earth,and made a glancing blow to Earth's magnetosphere.",
        "media_type": "video",
        "service_version": "v1",
        "title": "The Sun Unleashed: Monster Filament in Ultraviolet",
        "url": "https://www.youtube.com/embed/1rZAA5SYLZU?rel=0"
    }