- Posts: 69
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
How to add videos and audio (.mp4 and .mp3)?
- rachnasagar
- Topic Author
- Offline
- Senior Member
-
Less
More
9 years 8 months ago #11638
by rachnasagar
How to add videos and audio (.mp4 and .mp3)? was created by rachnasagar
What we have to do in code to play video and audio in android (RadaeePDF Eclipse 3.4)?
- ankur123987
-
- Offline
- Premium Member
-
- Available as freelancer (ex website to app 30min)
Less
More
- Posts: 97
- Thank you received: 0
9 years 8 months ago #11639
by ankur123987
Replied by ankur123987 on topic How to add videos and audio (.mp4 and .mp3)?
Is it in pdf file or do you want it separately?
9 years 8 months ago - 9 years 8 months ago #11640
by Davide
Replied by Davide on topic How to add videos and audio (.mp4 and .mp3)?
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.
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: 9 years 8 months ago by Davide.
- rachnasagar
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 69
- Thank you received: 0
9 years 8 months ago - 9 years 8 months ago #11641
by rachnasagar
Replied by rachnasagar on topic How to add videos and audio (.mp4 and .mp3)?
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
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: 9 years 8 months ago by rachnasagar. Reason: update
- rachnasagar
- Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 69
- Thank you received: 0
9 years 8 months ago #11642
by rachnasagar
Replied by rachnasagar on topic How to add videos and audio (.mp4 and .mp3)?
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
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
9 years 8 months ago #11644
by nermeen
Replied by nermeen on topic How to add videos and audio (.mp4 and .mp3)?
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.
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.
Time to create page: 0.464 seconds