mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 04:11:43 +00:00
18 lines
377 B
JavaScript
18 lines
377 B
JavaScript
const MediaClient = require('upnp-mediarenderer-client')
|
|
|
|
class DLNADevice extends MediaClient {
|
|
constructor(url) {
|
|
super(url)
|
|
this.name = ''
|
|
this.udn = ''
|
|
this.getDeviceDescription(this.update_Info.bind(this))
|
|
}
|
|
|
|
update_Info(err, desc) {
|
|
if (err) throw err
|
|
this.name = desc.friendlyName
|
|
this.UDN = desc.UDN
|
|
}
|
|
}
|
|
|
|
module.exports = DLNADevice
|