Sei qui:   Contenuto / Strumenti Per Sviluppatori / Api Di Contenuto / Regole Specifiche Per I Tipi Di Oggetto

Video sources

The Video sources (YouTube, Dailymotion, Vimeo, WMaker, etc.), that can be displayed in Video sections have several specificities in their Content API responses.

In each case, an Article source should return only items having an "video" type, and the subtype can vary (ex: "youtube", "dailymotion", "wmaker", etc.).


Specific management of the different video formats / embed

The "content" key of the dictionary shouldn't contain the embed code of the video. Only its description (that can be formatted in HTML) has to be returned.

The app inserts itself a button that allows the user to access the video in the detail page, using the values of the videoUrls dictionary. Here is the priority order of the dictionary entries:
1. embedHTML => If there is an embedHTML key, it's used in priority. Its content will be displayed without any modification
2. m3u8 / mp4 => If there isn't an embedHTML key, the app will show a button linking to the direct URL streams of the video
3. embed => If there isn't any direct stream URL for the video, the app will show an <iframe> having this key as source


Thumbnails management

The video items return 3 thumbnails formats (in 16/9 ratio), that will be chosen by the app according to the active list template. Here are some indicative sizes: 
smallThumbnail : 179x100 
thumbnail : 300x168
largeThumbnail : original size of the image