我们可以发挥使用Applet的音频和视频文件? [英] Can we play audio and video files using Applet?

查看:199
本文介绍了我们可以发挥使用Applet的音频和视频文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要开发起着音频和视频文件的网页。而我们需要改变使用诸如上,下,左,右箭头按钮来管理音频或视频的控件。

I need to develop the webpage which plays both audio and video files. And we need to change the controls using arrows like Up, Down, Left and Right buttons to manage the audio or video.

问候,
宁静。

Regards, Serenity.

推荐答案

如果这些音频和视频文件是由你严格控制格式,那么有办法在Java中实现这一目标。否则,Java是不是语言加载一个不错的选择,并使用多种媒体类型。

If these audio and video files are of formats strictly controlled by you, then there are ways to achieve this in Java. Otherwise Java is not a good choice of language for loading and using a wide variety of media types.

例如,的javax。 sound.sampled包涵盖之类AU,WAV及放; SND。它使用支持其他格式,你可以提供一个去codeR / EN codeR服务提供者接口。例如。可使用的 Java媒体框架(JMF)。

For example, the javax.sound.sampled package covers things like AU, WAV & SND. It uses the Service Provider Interface for supporting other formats for which you can provide a decoder/encoder. E.G. support for MP3s (decoding only) can be added using the mp3plugin.jar of the Java Media Framework (JMF).

和已经提到JMF把我们带到视频。 JMF可以加载和播放某些类型的MOV,AVI和MPEG文件,但不是所有的类型。 E.G.我有2柯达相机可以记录的MOV,年长的一家生产了与JMF兼容MOV文件,较新的MOV都没有。 JMF是'弃餐具这是一个相当不错的API,在它的一天 - 这真的只是今天落后的,因为缺乏更现代的codeCS(编码/文件类型)的支持 - 与网络摄像分辨率

And having mentioned JMF that brings us to video. JMF can load and play certain types of MOV, AVI and MPEG files, but not all types. E.G. I have 2 Kodak cameras that can record MOVs, the older one produces MOV files that are compatible with JMF, the newer MOVs aren't. JMF is 'abandon-ware' that was quite a good API in it's day - it really only lags today because of lack of support for the more modern CODECs (encoding/file types) - and web-cam resolutions.

说了这么多,在不指定无论是支持受控表示你的经验不足或每一个格式意味着你有很长的学习曲线,实现这一任务。 : - (

Having said all that, your inexperience indicated in not specifying whether it is to support 'controlled' or 'every' format suggests you have a long learning curve to achieving this task. :-(

这篇关于我们可以发挥使用Applet的音频和视频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆