Get thumbnail image of video from video url

后端 未结 8 1644
时光取名叫无心
时光取名叫无心 2021-01-04 19:30

Is it possible to get the thumbnail image from a video Url? I need to thumbnails of videos in a list view.

8条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-04 20:15

    It is possible to get thumbnail image of video from video url.

    If your video type is Vimeo follow below steps:

    1)Suppose your Video Url is: http://player.vimeo.com/video/17314292

    2)Get Video Id From Url : eg. 17314292

    3)Call WS with Video id and XMl format http://vimeo.com/api/v2/video/17314292.xml

    You will get "thumbnail_small","thumbnail_medium","thumbnail_large" in xml format for video thumb from video id

    If your video type is YouTube follow below steps:

    1)Video Url : http://www.youtube.com/embed/Nl2iMF0yKW8

    2)Get Video Id From Url : eg. Nl2iMF0yKW8

    3)Replace video id in this url http://i3.ytimg.com/vi/Nl2iMF0yKW8/default.jpg

    NOTE:Just replace your id here.

提交回复
热议问题