Skip to content

Uncaught ReferenceError: DrmStreamingPlayer is not defined #14

@iaiqbal

Description

@iaiqbal

I am experiencing the following error in the console. I'm following the API documentation as described in the readme. I've tried basic fixes like moving the code around in certain areas of the HTML, a script.js and in the actual napster.min.js. I've isolated the conflict to the .set method. "napster.min.js:15" refers to "Napster.member.set({.....".

napster.min.js:4 Uncaught ReferenceError: DrmStreamingPlayer is not defined
    at e.auth (napster.min.js:4)
    at l.<anonymous> (napster.min.js:4)
    at l.a.(anonymous function) [as set] (file:///C:/Users/Ibrahim%20Iqbal/Desktop/Bootcamp%20Homework/Project-1/assets/javascript/napster.min.js:4:6296)
    at napster.min.js:15
Napster.init({
    consumerKey: 'ZTk2YjY4MjMtMDAzYy00MTg4LWE2MjYtZDIzNjJmMmM0YTdm',
    isHTML5Compatible: true,
    version: 'v2.1',
    player: 'player-frame'
    // player: "aside"
});

Napster.member.set({
    accessToken: 'oauth access token',
    refreshToken: 'oauth refresh token'
});

Napster.player.on('ready', function (e) {
    Napster.member.set({ accessToken: 'oauth access token' }); // If not set earlier
    Napster.player.auth();
});


Napster.player.play('tra.313617399');



Has this been deprecated by any chance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions