Coder Social home page Coder Social logo

Playback example about tidalapi HOT 5 OPEN

0xvasconcelos avatar 0xvasconcelos commented on June 11, 2024
Playback example

from tidalapi.

Comments (5)

gyurobenjamin avatar gyurobenjamin commented on June 11, 2024 1

Token was wrong. With some token the file will be encrypted. Check some possibilities here. https://github.com/arnesongit/plugin.audio.tidal2/blob/d633fc9b2d25acf728111460c796e405aece522a/resources/lib/koditidal.py#L733

from tidalapi.

0xVasconcelos avatar 0xVasconcelos commented on June 11, 2024

I'll think about the native playback method, but you're right about the Wiki. I'll try make something this week. 👍

Thanks friend!

from tidalapi.

pschroen avatar pschroen commented on June 11, 2024

Improved example with wav to avoid the pop at the beginning.

api.getStreamURL({id:22560696}, function (data) {
  var reader = new wav.Reader();
  reader.on('format', function (format) {
    reader.pipe(new Speaker(format));
  });
  var url = quality === 'lossless' ? data.url : 'rtmp://'+data.url,
  ffmpeg(url).format('wav').pipe(reader, {end:true}).on('finish', function () {
    console.log('track finished');
  });
});

from tidalapi.

gyurobenjamin avatar gyurobenjamin commented on June 11, 2024

Is it still working example? I can play any wav song via http(s) with this example, but not the tidal url what this plugin provide.

Error: ffmpeg exited with code 1: http://audio-enc.tidal.com/v2/0/baf5111593e2f509567fa2901941b6e4_26.flac?__token__=exp=1503781950~hmac=ef36e4ff2c2ec32881b54e73141ef856052440c355d88df26a08f2a6fbe8c849: Invalid data found when processing input

    at ChildProcess.<anonymous> (/../tidal/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:192:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Don't we need to do anything with the encryptionKey?

from tidalapi.

gyurobenjamin avatar gyurobenjamin commented on June 11, 2024

AAC / High quality version works well via rtmp. But lossless/high-res doesn't with FLAC. I downloaded the FLAC file and can't do anything with that.

Any idea?

from tidalapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.