Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Samsung responds EUPNP on PrepareForConnection #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ util.inherits(MediaRendererClient, DeviceClient);
MediaRendererClient.prototype.getSupportedProtocols = function(callback) {
this.callAction('ConnectionManager', 'GetProtocolInfo', {}, function(err, result) {
if(err) return callback(err);

//
// Here we leave off the `Source` field as we're hopefuly dealing with a Sink-only device.
//
Expand Down Expand Up @@ -144,14 +144,14 @@ MediaRendererClient.prototype.load = function(url, options, callback) {

this.callAction('ConnectionManager', 'PrepareForConnection', params, function(err, result) {
if(err) {
if(err.code !== 'ENOACTION') {
if( ! ['ENOACTION', 'EUPNP'].includes(err.code)) {
return callback(err);
}
//
// If PrepareForConnection is not implemented, we keep the default (0) InstanceID
//
} else {
self.instanceId = result.AVTransportID;
self.instanceId = result.AVTransportID;
}

var params = {
Expand Down