返回信息流WRT WIDGET能否像JIL WIDGET一样支持对音频的播放和停止等操作?有无相关API?在诺基亚的官网上查API只找到查看音频信息的getList()函数......[ema23]求大牛解答...
这是一条镜像帖。来源:北邮人论坛 / mobile-internet / #559同步于 2010/7/10
该镜像源已超过 30 天没有更新,可能在源站已被删除。
MobileInternet机器人发帖
求解答...关于WRT WIDGET的问题。
BK201
2010/7/10镜像同步10 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
bd……能在aptana里面查help文档不?
【 在 BK201 (阿克塞尔) 的大作中提到: 】
: WRT WIDGET能否像JIL WIDGET一样支持对音频的播放和停止等操作?有无相关API?在诺基亚的官网上查API只找到查看音频信息的getList()函数......[ema23]求大牛解答...
在Nokia forum上找到一个这个帖子不知道能不能回答你
7楼ms信息量比较多
Unfortunately, Nokia has not provided any information in this area. Not sure
why there is such a big hole in the documentation!
There seem to be 3 options, but I have not exhaustively tested all 3.
1) launch the external player
This works well for sound. I have not tried it for video. I just used window
.location.href = "urlto.mp3". I have not tried any streaming protocols with
this approach. This approach also allows for lare file downloads. I have tes
ted downloading sounds of up to 25mb with no problem.
2) embed sound in web page with object tag
This shows an embedded control for the player but I dont think this is as "u
sable" compared to the external player. I have not tested streaming protocol
s with embedding sound. I have not tested large file sizes.
3) embed flash
Flash Lite can stream from Flash media server or a supporting server like Re
d5. These servers should support streaming of mp3 or FLV video to Flash Lite
3. I do not think that Flash Lite 3 can support mpeg 4 video streams from m
edia server. I do not think that media server can stream 3gp video or AAC au
dio.
Flash Lite can also download and play native sound and audio formats. No pro
gressive loading, only full download. Flash Lite will have memory limitation
s on the size of native sound and video formats that it can play. I doubt yo
u can play a 25mb sound file in an embedded Flash Lite player. I have not te
sted file size limits for Flash within WRT.
Users will need to select the embedded flash lite player to give it focus th
en interact with the player interface.
Also, some of the s60 3rd edition fp1 devices support WRT with a firmware up
date. It would be important to verify that these upgraded devices support Fl
ash Lite 3, not Flash Lite 2 to avoid compatibility issues. I am not sure if
all of the firmware updates to Flash Lite 3 or if some firmwares updated WR
T only and kept Flash Lite at 2.0.
4) there may be an option to embed real media player which should support st
reaming of other video formats. Embedding video in the web page may actually
invoke the real media player. I have not tested embedding video at all.
来源为http://discussion.forum.nokia.com/forum/showthread.php?166396-Is-Audio
-video-streaming-supported-in-Widget&p=741846
【 在 BK201 (阿克塞尔) 的大作中提到: 】
: 那个也查过了,也没有找到有关播放音频文件的函数.....[ema8][ema8]
【 在 raintemple 的大作中提到: 】
: 在Nokia forum上找到一个这个帖子不知道能不能回答你
: 7楼ms信息量比较多
: Unfortunately, Nokia has not provided any information in this area. Not sure
: ...................
试了一下....用“window.location.href = "urlto.mp3";”来引用外部播放器在APTANA上没运行出理想的效果....可能要按帖子说的到实机上去测试....使用flash的方法还不懂...再研究一下。
感谢你的帮助....之前一直没预测到WRT会不提供这样的API...还好还有一些时间....
没事不客气……不过WRT不提供这个API确实也挺烦人……
【 在 BK201 的大作中提到: 】
: : 在Nokia forum上找到一个这个帖子不知道能不能回答你
: : 7楼ms信息量比较多
: : Unfortunately, Nokia has not provided any information in this area. Not sure
: ...................
【 在 raintemple 的大作中提到: 】
: 没事不客气……不过WRT不提供这个API确实也挺烦人……
: 【 在 BK201 的大作中提到: 】
: : : 在Nokia forum上找到一个这个帖子不知道能不能回答你
: ...................
相比之下JIL的API还是挺丰富的........
设置也挺合理,只不过实现起来有点不那么顺畅
【 在 BK201 的大作中提到: 】
: : 没事不客气……不过WRT不提供这个API确实也挺烦人……
: : 【 在 BK201 的大作中提到: 】
: : : : 在Nokia forum上找到一个这个帖子不知道能不能回答你
: ...................
【 在 raintemple 的大作中提到: 】
: 设置也挺合理,只不过实现起来有点不那么顺畅
: 【 在 BK201 的大作中提到: 】
: : : 没事不客气……不过WRT不提供这个API确实也挺烦人……
: ...................
学长,我后来找到了一段用JS播放音频的代码:
function play(file) {
var embed = document.createElement("embed");
embed.setAttribute('src', file);
embed.setAttribute('hidden', true);
embed.setAttribute('autostart', true);
document.body.appendChild(embed);
}
onclick="play('file.wav');"
在Aptana上跑不了,但在N97上能跑。如果我想连续播放几个WAV文件,代码该怎么写?
我试过像这样写:
function playx()
{
play(“a.wav”);
play(“b.wav”);
}
无法实现连续播放.....
原帖地址:
http://bytes.com/topic/javascript/insights/767825-playing-sound-file-javascript-function
aptana跑不起来可能是因为src路径的问题,调试时应该用PC存储路径而跑真机用的自然是真机存储路径
连续播的话,可以编写js逻辑实现播wav1完成后开播wav2。
或者干脆用什么软件把wav1与wav2剪到一起不就ok了么
【 在 BK201 的大作中提到: 】
: : 设置也挺合理,只不过实现起来有点不那么顺畅
: : 【 在 BK201 的大作中提到: 】
: : : : 没事不客气……不过WRT不提供这个API确实也挺烦人……
: ...................