Fixed class docs

This commit is contained in:
Pavle Goloskokovic 2018-02-18 21:18:09 +01:00
parent 735394bc84
commit 0d20a413a7

View file

@ -3,7 +3,6 @@
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Class = require('../../utils/Class');
var BaseSound = require('../BaseSound');
@ -17,18 +16,14 @@ var BaseSound = require('../BaseSound');
* @constructor
* @author Pavle Goloskokovic <pgoloskokovic@gmail.com> (http://prunegames.com)
* @since 3.0.0
*
*
* @param {Phaser.Sound.HTML5AudioSoundManager} manager - Reference to the current sound manager instance.
* @param {string} key - Asset key for the sound.
* @param {ISoundConfig} [config={}] - An optional config object containing default sound settings.
* @param {SoundConfig} [config={}] - An optional config object containing default sound settings.
*/
var HTML5AudioSound = new Class({
Extends: BaseSound,
initialize:
function HTML5AudioSound (manager, key, config)
initialize: function HTML5AudioSound (manager, key, config)
{
if (config === void 0) { config = {}; }
@ -43,7 +38,6 @@ var HTML5AudioSound = new Class({
* @since 3.0.0
*/
this.tags = manager.game.cache.audio.get(key);
if (!this.tags)
{
// eslint-disable-next-line no-console
@ -86,11 +80,8 @@ var HTML5AudioSound = new Class({
* @since 3.0.0
*/
this.previousTime = 0;
this.duration = this.tags[0].duration;
this.totalDuration = this.tags[0].duration;
BaseSound.call(this, manager, key, config);
},
@ -101,10 +92,10 @@ var HTML5AudioSound = new Class({
*
* @method Phaser.Sound.HTML5AudioSound#play
* @since 3.0.0
*
*
* @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.
* @param {ISoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.
*
*
* @return {boolean} Whether the sound started playing successfully.
*/
play: function (markerName, config)
@ -139,7 +130,7 @@ var HTML5AudioSound = new Class({
*
* @method Phaser.Sound.HTML5AudioSound#pause
* @since 3.0.0
*
*
* @return {boolean} Whether the sound was paused successfully.
*/
pause: function ()
@ -178,7 +169,7 @@ var HTML5AudioSound = new Class({
*
* @method Phaser.Sound.HTML5AudioSound#resume
* @since 3.0.0
*
*
* @return {boolean} Whether the sound was resumed successfully.
*/
resume: function ()
@ -218,7 +209,7 @@ var HTML5AudioSound = new Class({
*
* @method Phaser.Sound.HTML5AudioSound#stop
* @since 3.0.0
*
*
* @return {boolean} Whether the sound was stopped successfully.
*/
stop: function ()
@ -251,7 +242,7 @@ var HTML5AudioSound = new Class({
* @method Phaser.Sound.HTML5AudioSound#pickAndPlayAudioTag
* @private
* @since 3.0.0
*
*
* @return {boolean} Whether the sound was assigned an audio tag successfully.
*/
pickAndPlayAudioTag: function ()
@ -303,7 +294,7 @@ var HTML5AudioSound = new Class({
* @method Phaser.Sound.HTML5AudioSound#pickAudioTag
* @private
* @since 3.0.0
*
*
* @return {boolean} Whether the sound was assigned an audio tag successfully.
*/
pickAudioTag: function ()
@ -446,7 +437,7 @@ var HTML5AudioSound = new Class({
* @method Phaser.Sound.HTML5AudioSound#update
* @protected
* @since 3.0.0
*
*
* @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.
* @param {number} delta - The delta time elapsed since the last frame.
*/