We are running an android app which delivers recorded video classes to students. We want to use DigitalOcean(DO) Object storage to host the videos. I also want to set speed and quality control of the videos. I Know I can host the videos on DO. But after hosting here, how do I play on my app. If I will put the link to my default android player, will I be able to set speed control or quality control of the video. Will I have to use any intermediate service to do that. Please help me to do that. I search over the net, but did not get any proper documentation.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Once the static content is uploaded to your DigitalOcean space you will need a media player library to control the videos itself.
Additional libraries might be required to control the speed or the quality of the videos. For quality control, you might need to encode your videos in multiple resolutions/bitrates. Your app can select the appropriate video quality based on the user’s network connection or preferences.
Hope that this helps!
Hi there,
To use DO Object storage for Video on demand service, follow these steps:
Once you have completed these steps, you will be able to play your videos on your Android app using the DO Spaces endpoint.
To set speed and quality control of the videos, you will need to use an intermediate service such as JW Player or MediaElement.js. These services provide a variety of features for streaming videos, including speed and quality control.
Here is an example of how to use JW Player to stream a video from DO Object storage:
<div id="my-video"></div>
<script src="https://cdn.jwplayer.com/jwplayer/8.16.5/jwplayer.min.js"></script>
<script>
jwplayer("my-video").setup({
file: "https://your-do-spaces-endpoint/my-video.mp4",
controls: true,
plugins: {
speed: true,
quality: true
}
});
</script>
Use code with caution. Learn more content_copy
This code will create a video player with speed and quality controls. The file property specifies the URL of the video in DO Object storage.
You can also use MediaElement.js to stream videos from DO Object storage. MediaElement.js is a lightweight JavaScript library that provides a variety of features for streaming videos, including speed and quality control.
Here is an example of how to use MediaElement.js to stream a video from DO Object storage:
<video id="my-video"></video>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mediaelement/5.1.1/build/mediaelement-and-player.min.js"></script>
<script>
var player = new MediaElementPlayer("#my-video", {
src: "https://your-do-spaces-endpoint/my-video.mp4",
plugins: ["speed", "quality"]
});
</script>
This code will create a video player with speed and quality controls. The src property specifies the URL of the video in DO Object storage.
I hope this helps!
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.