driebit/elm-ginger/2.3.0

NOTE: the latest version is 5.0.1

Ginger.Media

Definitions

type Media
= Image (Dict String String)
| Video VideoData
| Empty
= Avatar
| Thumbnail
| Card
| Small
| Medium
| Large
| Cinemascope
| Custom String
type alias VideoData =
{ embedCode : String
, width : Int
, height : Int
}

Build & Query

imageUrl : MediaClass -> Media -> Maybe String

The image url with a given MediaClass

videoData : Media -> Maybe VideoData

The video data.

Decode

fromJson : Decoder Media

Decode image and video data