Package com.google.gdata.data.youtube

Examples of com.google.gdata.data.youtube.CaptionTrackFeed


  }

  public Map<String, String> getCaptions(String videoId) {
    String feedUrl = String.format(CAPTION_FEED_URL_FORMAT, videoId);
    try {
      CaptionTrackFeed captionTrackFeed = service.getFeed(new URL(feedUrl), CaptionTrackFeed.class);

      HashMap<String, String> languageToUrl = new HashMap<String, String>();
      for (CaptionTrackEntry captionTrackEntry : captionTrackFeed.getEntries()) {
        String languageCode = captionTrackEntry.getLanguageCode();
        Link link = captionTrackEntry.getLink("edit-media", "application/vnd.youtube.timedtext");
        if (link != null) {
          languageToUrl.put(languageCode, link.getHref());
        }
View Full Code Here

TOP

Related Classes of com.google.gdata.data.youtube.CaptionTrackFeed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.