RadaeePDF.com :: Topic: How to add videos and audio (.mp4 and .mp3)? (1/5)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: How to add videos and audio (.mp4 and .mp3)?

How to add videos and audio (.mp4 and .mp3)? 11 months 1 week ago #11638

  • rachnasagar
  • rachnasagar's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 69
  • Karma: 0
What we have to do in code to play video and audio in android (RadaeePDF Eclipse 3.4)?
The administrator has disabled public write access.

How to add videos and audio (.mp4 and .mp3)? 11 months 1 week ago #11639

  • ankur123987
  • ankur123987's Avatar
  • OFFLINE
  • Expert Boarder
  • Available as freelancer (ex website to app 30min)
  • Posts: 97
  • Karma: 0
Is it in pdf file or do you want it separately?
The administrator has disabled public write access.

How to add videos and audio (.mp4 and .mp3)? 11 months 1 week ago #11640

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 717
  • Thank you received: 56
  • Karma: 16
Hi,
to play video I suggest you to follow this guide : www.radaeepdf.com/support/knowledge-base...component&kbartid=68
To play audio you have to do something similar but using OnPDFOpenSound and Android MediaPlayer APIs.
Seems that you are using an old version of the library, I suggest you to update it and to migrate your project to Android Studio, we don't support Eclipse anymore.
Last Edit: 11 months 1 week ago by Davide.
The administrator has disabled public write access.

How to add videos and audio (.mp4 and .mp3)? 11 months 1 week ago #11641

  • rachnasagar
  • rachnasagar's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 69
  • Karma: 0
yes it is a pdf fil only .
And I have Integrated Video in the pdf ,I just want to open in RDPDF reader . Also in the above link its given videopath so please clear me which path i will give there , its a pdf and how I will kno the video path in the PDF
Last Edit: 11 months 1 week ago by rachnasagar. Reason: update
The administrator has disabled public write access.

How to add videos and audio (.mp4 and .mp3)? 11 months 1 week ago #11642

  • rachnasagar
  • rachnasagar's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 69
  • Karma: 0
I have followed the link . And its working but, I dont want to put video in storage, I just integrate the video with the pdf and when we open the pdf though your reader it starts play on click. Presently when we click the video it shows top bar with play option.

Also
public void OnPDFOpenMovie(String path) {
Intent intent = new Intent(this, VideoPlayer.class);
intent.putExtra("VIDEOPATH", mVideoPath);
startActivity(intent);
}

this code show we have to put the path of the video and I have to store in storage, but i want to play the video in the reader.
not from storage
The administrator has disabled public write access.

How to add videos and audio (.mp4 and .mp3)? 11 months 1 week ago #11644

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 49
  • Karma: 18
For storage part, You have to pass through a temp file, we have made this choice to avoide memory issues in case of big videos (we have clients who uses embedded videos of 200/300MB).

using the above code, you are using a 3rd party app to play the video, in this case you have to save the video view in the SDcard to be accessible from that app.
Note; in the KB there is another choice of using a custom video view, in this case you can save the video in the app's cache directory, play it and then destroy the file. (Video view object accepts only a path or File object)

For the onclick part, this is default behavior of the demo project, you can change this implementation according to your requirements.
The administrator has disabled public write access.
Powered by Kunena Forum