sound.js
来自「当前比较流行的,漂亮的JS框架,这里面用到的API文档」· JavaScript 代码 · 共 27 行
JS
27 行
/*
* Ext JS Library 0.20
* Copyright(c) 2006-2008, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
/**
* @class Ext.air.Sound
*
* @singleton
*/
Ext.air.Sound = {
/**
* Play a sound.
* @param {String} file The file to be played. The path is resolved against applicationDirectory
* @param {Number} startAt (optional) A time in the sound file to skip to before playing
*/
play : function(file, startAt){
var soundFile = air.File.applicationDirectory.resolvePath(file);
var sound = new air.Sound();
sound.load(new air.URLRequest(soundFile.url));
sound.play(startAt);
}
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?