Flash视频播放器常用的onMetaData参数信息说明
Flash视频播放器常用的onMetaData参数信息说明,duration,videodatarate,videosize,audiosize
例子1
- nets.onMetaData = function(metadata){
- trace('onMetaData event at '+nets.time);
- trace(' duration: '+metadata.duration+newline+
- ' lasttimestamp: '+metadata.lasttimestamp+newline+
- ' lastkeyframetimestamp: '+metadata.lastkeyframetimestamp+newline+
- ' width: '+metadata.width+newline+
- ' height: '+metadata.height+newline+
- ' videodatarate: '+metadata.videodatarate+newline+
- ' audiodatarate: '+metadata.audiodatarate+newline+
- ' framerate: '+metadata.framerate+newline+
- ' creationdate: '+metadata.creationdate+newline+
- ' filesize: '+metadata.filesize+newline+
- ' videosize: '+metadata.videosize+newline+
- ' audiosize: '+metadata.audiosize+newline+
- ' datasize: '+metadata.datasize+newline+
- ' metadatacreator: '+metadata.metadatacreator+newline+
- ' metadatadate: '+metadata.metadatadate
- );
- trace(' audiocodecid: '+metadata.audiocodecid+newline+
- ' videocodecid: '+metadata.videocodecid+newline+
- ' audiodelay: '+metadata.audiodelay+newline+
- ' canseektoend: '+metadata.canSeekToEnd);
- trace(' cuePoints:');
- for (n=0; n<metadata.cuePoints.length; n++) {
- cp = metadata.cuePoints[n];
- trace(' '+cp.time+' "'+cp.name+'" ('+cp.type+')');
- if (cp.parameters != undefined) {
- trace(' parameters: ');
- for (paramName in cp.parameters) {
- trace(' "'+paramName+'" = "'+cp.parameters[paramName]+'"');
- }
- }
- }
- trace(' custommetadata:');
- for (paramName in metadata.custommetadata) {
- trace(' "'+paramName+'" = "'+metadata.custommetadata[paramName]+'"');
- }
- trace(' keyframes:');
- fp=metadata.keyframes.filepositions;
- ti=metadata.keyframes.times;
- for (n=0; n<fp.length; n++){
- trace(' fileposition: '+fp[n]+' time: '+ti[n]);
- }
- }
例子2
- nets.onMetaData = function(metadata){
- var level;
- function levelStr(level){
- s='';
- for (n=0;n<level;n++){ss=s+' '};
- return(s);
- }
- function traceThis(x){
- level++;
- for (y in x){
- switch (typeof(x[y])) {
- case 'object':
- trace(levelStr(level)+y+' : ');
- traceThis(x[y]);
- break;
- default:
- trace(levelStr(level)+y+' = '+x[y]);
- break;
- }
- }
- level--;
- }
- level=0;
- traceThis(metadata);
- }
热门文章推荐
- 纯HLS(m3u8)跨平台技术(HLSPlayer,m3u8Player跨平台多终端)
- DiscuzX3.2酷播视频插件(dz论坛自定义视频插件带广告
- [微信视频]实现网站中的视频在微信平台上正常播放(超多组图)
- [rtsp]海康威视监控摄像头实现web端无插件监控实拍效果
- 很酷,酷播wordpress视频插件(支持PC/安卓/苹果跨平台播放)
- [组图]微信视频技术:支持微信视频直播和视频点播
- [AS3]as3.0的rtmp流媒体播放器写法源代码示例
- 一步一步教你制作FLV网页视频播放器
请稍候...