How to add videos and audio (.mp4 and .mp3)? - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
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)? 1 year 1 month ago #11638

  • rachnasagar
  • rachnasagar's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 69
  • Thank you received: 0
What we have to do in code to play video and audio in android (RadaeePDF Eclipse 3.4)?

Please Log in or Create an account to join the conversation.

How to add videos and audio (.mp4 and .mp3)? 1 year 1 month ago #11639

  • ankur123987
  • ankur123987's Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Available as freelancer (ex website to app 30min)
  • Posts: 97
  • Thank you received: 0
Is it in pdf file or do you want it separately?

Please Log in or Create an account to join the conversation.

How to add videos and audio (.mp4 and .mp3)? 1 year 1 month ago #11640

  • Davide
  • Davide's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 744
  • Karma: 16
  • Thank you received: 56
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.

Please Log in or Create an account to join the conversation.

Last Edit: by Davide.

How to add videos and audio (.mp4 and .mp3)? 1 year 1 month ago #11641

  • rachnasagar
  • rachnasagar's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 69
  • Thank you received: 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

Please Log in or Create an account to join the conversation.

Last Edit: by rachnasagar. Reason: update

How to add videos and audio (.mp4 and .mp3)? 1 year 1 month ago #11642

  • rachnasagar
  • rachnasagar's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 69
  • Thank you received: 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

Please Log in or Create an account to join the conversation.

How to add videos and audio (.mp4 and .mp3)? 1 year 1 month ago #11644

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 754
  • Karma: 20
  • Thank you received: 55
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.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum