Coder Social home page Coder Social logo

Soundcloud support about browser-mpris2 HOT 6 CLOSED

otommod avatar otommod commented on August 16, 2024 1
Soundcloud support

from browser-mpris2.

Comments (6)

otommod avatar otommod commented on August 16, 2024 2

So, I poked around the site a bit. It's quite the complex webapp, as everything is these days.

Play/pause and next/previous, through the UI, work fine. Let's do some seeking then. That's where the problems start.

There is no <audio> tag to be found in the DOM. Not an insurmountable problem but we have to resort to annoying solutions (monkeypatching the document.createElement function with our own that tracks <audio>).
Moreover, SoundCloud don't use normal files but blobs. Now, on its own that is not a problem. However, on seek a new blob is created that is not the full song so the currentTime and duration on the <audio> element are mostly wrong.

So next idea: use the UI for seeking just like everything else. However, my fake MouseEvents don't register for whatever reason. From what I can see in SoundCloud's code isTrusted is never checked so I don't know what the problem is.

I thought of using the API but it can't be used to control the playback on the site itself, only for external playback inside other apps or sites. At least, I don't think it can.

So, in conclusion, I'll make half the site work. It's probably the half most people use anyways through MPRIS2 but it'd still be nice if I could also make seeking work. If someone knows how, feel free to request a pull!

from browser-mpris2.

artizirk avatar artizirk commented on August 16, 2024 1

@mikroskeem @otommod i just tested the soundcloud branch and it works on my machine.

I only tested play/pause and prev/next track and track info

from browser-mpris2.

otommod avatar otommod commented on August 16, 2024

Checkout the soundcloud branch for a very rough first try.

from browser-mpris2.

otommod avatar otommod commented on August 16, 2024

Ping; with the recent changes I think this is mostly resolved.

from browser-mpris2.

mikroskeem avatar mikroskeem commented on August 16, 2024

Ah right, I had to test this. Will do that tomorrow 😄

from browser-mpris2.

otommod avatar otommod commented on August 16, 2024

ping

from browser-mpris2.

Related Issues (13)

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.