Examples of MediaSource


Examples of com.google.gdata.data.media.MediaSource

        ServiceException {
      System.out.println("Downloading file from: " + downloadUrl);

      MediaContent mc = new MediaContent();
      mc.setUri(downloadUrl);
      MediaSource ms = service.getMedia(mc);

      InputStream inStream = null;
      FileOutputStream outStream = null;

      try {
        inStream = ms.getInputStream();
        outStream = new FileOutputStream(fullFilePath);

        int c;
        while ((c = inStream.read()) != -1) {
          outStream.write(c);
View Full Code Here

Examples of com.google.gdata.data.media.MediaSource

    System.out.print("Downloading document with id :" + id + " ....");
    System.out.flush();

    MediaContent mc = new MediaContent();
    mc.setUri(feedUrl.toString());
    MediaSource ms = service.getMedia(mc);

    InputStream inStream = null;
    FileOutputStream outStream = null;
    try {
      inStream = ms.getInputStream();
      outStream = new FileOutputStream(targetFile);

      int c;
      while ((c = inStream.read()) != -1) {
        outStream.write(c);
View Full Code Here

Examples of com.google.gdata.data.media.MediaSource

  public InputStream getPdfInputStream(DocumentListEntry document) throws ServiceException {
    String exportUrl = ((MediaContent)document.getContent()).getUri() + "&exportFormat=pdf";
    MediaContent mc = new MediaContent();
    mc.setUri(exportUrl);
    try {
      MediaSource ms = client().getMedia(mc);
      return ms.getInputStream();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of com.google.gdata.data.media.MediaSource

      throw new DocumentListException("null passed in for required parameters");
    }

    MediaContent mc = new MediaContent();
    mc.setUri(exportUrl.toString());
    MediaSource ms = service.getMedia(mc);

    InputStream inStream = null;
    FileOutputStream outStream = null;

    try {
      inStream = ms.getInputStream();
      outStream = new FileOutputStream(filepath);

      int c;
      while ((c = inStream.read()) != -1) {
        outStream.write(c);
View Full Code Here

Examples of org.wicketstuff.html5.media.MediaSource

  public VideoPlayer update(AjaxRequestTarget target, FlvRecording r) {
    boolean videoExists = r != null && getMp4Recording(r.getFileHash()).exists();
    if (videoExists) {
      PageParameters pp = new PageParameters().add("id", r.getFlvRecordingId());
      playerModel.setObject(Arrays.asList(
          new MediaSource("" + getRequestCycle().urlFor(mp4res, pp), "video/mp4")
          , new MediaSource("" + getRequestCycle().urlFor(oggres, pp), "video/ogg")));
      player.recId = r.getFlvRecordingId();
    }
    container.setVisible(videoExists);
    if (target != null) {
      target.add(container);
View Full Code Here

Examples of org.wicketstuff.html5.media.MediaSource

  public VideoPlayer update(AjaxRequestTarget target, FlvRecording r) {
    boolean videoExists = r != null && getMp4Recording(r.getFileHash()).exists();
    if (videoExists) {
      PageParameters pp = new PageParameters().add("id", r.getFlvRecordingId());
      playerModel.setObject(Arrays.asList(
          new MediaSource("" + getRequestCycle().urlFor(mp4res, pp), "video/mp4")
          , new MediaSource("" + getRequestCycle().urlFor(oggres, pp), "video/ogg")));
    }
    container.setVisible(videoExists);
    if (target != null) {
      target.add(container);
    }
View Full Code Here

Examples of org.wicketstuff.html5.media.MediaSource

*/
public class AudioDemo extends BasePage {

    public AudioDemo() {
        final List<MediaSource> mm = new ArrayList<MediaSource>();
        mm.add(new MediaSource("/loser.wav"));
        mm.add(new MediaSource("/loser.ogg"));

        IModel<List<MediaSource>> mediaSourceList = new AbstractReadOnlyModel<List<MediaSource>>() {
      private static final long serialVersionUID = 1L;

      public List<MediaSource> getObject() {
View Full Code Here

Examples of org.wicketstuff.html5.media.MediaSource

public class VideoDemo extends BasePage {

    public VideoDemo() {

        final List<MediaSource> mm = new ArrayList<MediaSource>();
        mm.add(new MediaSource("/dizzy.mp4", "video/mp4"));
        mm.add(new MediaSource("/dizzy.ogv", "video/ogg"));

        IModel<List<MediaSource>> mediaSourceList = new AbstractReadOnlyModel<List<MediaSource>>() {
      private static final long serialVersionUID = 1L;

      public List<MediaSource> getObject() {
View Full Code Here

Examples of org.wicketstuff.html5.media.MediaSource

  public VideoDemo()
  {

    final List<MediaSource> mm = new ArrayList<MediaSource>();
    mm.add(new MediaSource("dizzy.mp4", "video/mp4"));
    mm.add(new MediaSource("dizzy.ogv", "video/ogg"));

    IModel<List<MediaSource>> mediaSourceList = new AbstractReadOnlyModel<List<MediaSource>>()
    {
      private static final long serialVersionUID = 1L;
View Full Code Here

Examples of org.wicketstuff.html5.media.MediaSource

  private static final long serialVersionUID = 8364098763780612520L;

  public AudioDemo()
  {
    final List<MediaSource> mm = new ArrayList<MediaSource>();
    mm.add(new MediaSource("loser.wav"));
    mm.add(new MediaSource("loser.ogg"));

    IModel<List<MediaSource>> mediaSourceList = new AbstractReadOnlyModel<List<MediaSource>>()
    {
      private static final long serialVersionUID = 1L;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.