Giter Club home page Giter Club logo

Comments (4)

jxnblk avatar jxnblk commented on August 18, 2024

I assume you figured this out? There is a basic audio player in there, if you want to use as a reference, but it might make more sense to build a simple one from scratch.

from plangular.

JeanHules avatar JeanHules commented on August 18, 2024

Hey Brent,

Thank you for getting back to me on this issue. I am slowly figuring it
out. I am new to angular so its taking a little longer than it would
normally take. If I understand your code correctly, it takes a SC URL ,
runs it through the SC API to get the stream_url then creates the mp3 URL
with the streamurl in combination with the clientID.

The issue I am running into is bypassing the SC API process and using a mp3
url directly from my json response. I guess the way to solve that would be
to set the player.tracks:[ ] with the json response data.

I was wondering if you help answer a couple questions of mine. I am trying
to figure out how to turn your code into a simple JSON fed mp3 player. I
see the player.js code, but I am already pretty far into modifying this
existing plangular code to give up. Plus I am learning quite a bit about
angular from poking around. Though the one thing I am struggling with is
how to pass the json into the directive so that player.tracks = the json
response data. After getting the data down to the tracks:[ ], I am guessing
I will be able to poke around and figure the rest out.

I guess I also have to ask if doing that is the best way to do this? I made
a little Plunker environment. Could you take a look and let me know if you
have any suggestions, it would be greatly appreciated.

http://plnkr.co/edit/DeQkLOamYomizr6GMYdc?p=info

from plangular.

jxnblk avatar jxnblk commented on August 18, 2024

Yeah I can take a look tomorrow or Monday, but you should remove your number from the comments since this is a public repo :)

from plangular.

jxnblk avatar jxnblk commented on August 18, 2024

Sorry, I'm having trouble getting the plnkr to work. Seems like you might be referencing a different scope variable in your controller and in your index.html though.

Generally though, you might want to consider how to split up the handling of the tracks array and simplifying the player directive to just play one at a time, then use a directive or controller to handle the array and next/previous methods. Plangular does both so that it can be isolated, but I would split those two things out if I was building something custom. Or, maybe check out the source for https://github.com/jxnblk/SoundRad/ as there might be some useful examples there.

from plangular.

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.