radio/libjs/wController/file/audio.js

25 lines
631 B
JavaScript
Raw Normal View History

2018-12-17 17:15:58 +00:00
"use strict";
var File = require("./file");
var Vocabulary = require("../../wType/vocabulary");
var Vector = require("../../wType/vector");
2018-12-17 17:15:58 +00:00
var Uint64 = require("../../wType/uint64");
var Audio = File.inherit({
className: "Audio",
constructor: function Audio(addr) {
File.fn.constructor.call(this, addr);
},
2018-12-17 17:15:58 +00:00
hasMore: function() {
return this.getSize() > this.data.length();
2018-12-17 17:15:58 +00:00
},
getBitrate: function() {
return this._additional.at("bitrate").valueOf();
2018-12-17 17:15:58 +00:00
},
getDuration: function() {
return this._additional.at("duration").valueOf();
2018-12-17 17:15:58 +00:00
}
});
module.exports = Audio;