kendraio / kendraio-app

Kendraio App
https://app.kendra.io
MIT License
22 stars 6 forks source link

Kendraio Player Audiotarky integration (bounty) #169

Open dahacouk opened 3 years ago

dahacouk commented 3 years ago

We're kicking off our first of four bounty programmes in collaboration with Simon Metson from Audiotarky. Audiotarky is one of our partners in our project, Kendraio Pay, funded by Grant for the Web. Grant for the Web is founded on the belief that a healthy internet needs openness and opportunity. It's a fund by Coil, Mozilla and Creative Commons, supporting an open, fair, and inclusive standard for monetising content on the web. In this bounty, we're exploring how rights management and payments operate when working with multiple DSPs.

The bounty

For this bounty, we're rewarding the individual (or group) that carries out the tasks below, in a way that is transparent, interoperable, and easy to use.

We have an existing audio player that supports Web Monetization with Coil login - with or without a browser extension - but not yet with Audiotarky. Candidates should have some existing experience with Javascript and web API's. Once a candidate has put themselves forward, our Kendraio developers can work with them exclusively for 2 weeks (or more by mutual agreement). After the agreed period if tasks remain, another candidate may be given the opportunity instead.

Tasks

We will be very flexible with any hiccups that may occur and we will hold your hand all the way. We don't like stress here at Kendraio. We just want to see people enjoying building with Kendraio App.

Technical details

We have a technical blog post that provides background and demonstrates a simple Flow using the Kendraio Player block with the "Web Money" block. The more advanced Kendraio Player uses GraphQL to load a track list and artist payment pointers from DSP1.

Source code

Audiotarky API

Audiotarky data is available through a simple API. Currently this is not "discoverable"; you need to know the artist stub ID to find their work. There will be a genre API ~soon.

Evaluation

Kendraio Player

Kendraio Player is a media player incorporating Coil's implementation of Web Monetization and funded by Grant for the Web. The player was built in Kendraio App. Kendraio App is a low-code dashboard creator that helps build interfaces using Flows that connect to APIs with minimal code needed. The App has an audio player block (Kendraio Player) that supports Web Monetization, using either Coil's browser extension or login API -- but it is not yet integrated with the Audiotarky streaming service.

The Kendraio App let's users build interfaces from blocks. The blocks themselves are plumbed together with modern Javascript, Typescript, and are configured using JSON. We have various backend APIs, and proxy endpoints hosted using Vercel's serverless platform.

Requirements

Candidates should have some existing experience with Javascript and web APIs. Must be willing to document and talk about their experience of working on the tasks in this bounty.

Process

Once a candidate has put themselves forward, our Kendraio developers will mentor them exclusively for 2 weeks (or more, by mutual agreement). If after the agreed upon period tasks remain open, another candidate may be given the opportunity instead.

Kendraio App is a general framework for creating low-code applications. Kendraio App was originally created to service the creative/music industry to enable easy asset and rights management both locally and on third-party platforms. But what we've ended up creating is a generic data browser that plugs into remote APIs and enables highly configurable low-code interfaces to be built. And we'll use this framework as the basis of this project.

Please check out these links before accepting this mission:

As you create this project your feedback will influence the direction and capabilities of the Kendraio framework.

totorogendut commented 3 years ago

Hello, I'm Radhy from ProgNovel. I'm interested in this, but am not experienced with Kendrio stack like Angular and Graphql (if Graphql is required). I'm willing to learn more about this and please let me know where to get started.

dahacouk commented 3 years ago

Hey @ProgNovel ! Thanks for dropping by! The best thing is for you to take a look at all the links in the bounty text and get back to us with questions. How does that sound? Cheers Daniel

totorogendut commented 3 years ago

Hello @dahacouk. That's fine by me. I've downloaded the 97 pages PDF documentation and trying to figuring out what adapters and workflow in Kendraio are. I'll follow up with more questions once I got the basic down. Cheers!

totorogendut commented 3 years ago

Should I start from copying web-money block and make the ui from scratch @dahacouk ? Or should I make changes to https://app.kendra.io/player/all (which I couldn't manage to locate on the source code by the way)?

Also, when does the bounty timeframe start? Does it have begun already?

dahacouk commented 3 years ago

I suggest making changes to https://app.kendra.io/player/all and see how far you get in adding in Audiotarky music via their API. You can share your progress here by pasting the output of the share icon (image) which is exposed when you hit the cog icon (image) and the side bar slides in. Here's the Kendraio Player using that share icon to start with. There are other ways we could manage low-code Flow development, and we'd be interested in your experience, comments and suggestions.

Don't worry about the timing so much. Just keep checking in and share your experiences with us here. If you run over a little then no worries. Good luck.

totorogendut commented 3 years ago

Okay, cool. I'll try to familiarize myself with the low code first. I'll try sharing my first impression on the editor here.

At first glance, the minor pain point for me is that there is no way to "fullscreen" the Workflow editor like composing emails in fullscreen. This is not a big deal, since the change on the player is reactive, and there's an expand button. But it'd be nice if there's a zen mode where we could focus on the flow logic without distraction in the future, since a good part of the flow task is dealing with data. That or perhaps, adding an option for user to pick whether they want to edit the workflows either on the right side of the window or the left side (many apps just feel intuitive when dealing with task with left side bar, like VS Code, Wordpress CSS Editor, etc).

The next one is quite a bother for me; the flow tabs are always closed when I opened another one. I kept losing my train of thought whenever there's an extra step (an unnecessary mouse click) that's required to track what I've been doing previously.

There's also an opportunity for improvement to make a very short summary of what the blocks do. Mapping block, for example, tells that it will map data using JMESPath when I first try creating the block. But this is the first time for me using the Workflow editor and I don't remember most blocks' functionality were, especially when dealing with many blocks at once. My first instinct when I don't remember what this block does is to open the documentation, although I think it'll be faster if there's a summary right when I'm dealing with the block (perhaps hidden in the tooltip).

Beyond those, using Kendraio as a low code seems pretty good to me. I like how it is reactive with slight changes like changing flows' order by dragging them with the mouse. This feels natural than having to make a big change and hit the save button only to have the page refreshed to see my changes applied. If there's a change I would like to see the most on Kendraio then it would be implementation of skeleton shell instead of spinner whenever Kendraio fetches fresh data. I don't have issues with spinner, though personally I think websites with spinners are those websites that are developed from the previous generation back when SPA is the latest cool thing on the web development. Also, Kendraio's current implementation of spinner seems a little bad on Cumulative Layout Shift metric.

As for implementing Audiotarky API, though, unfortunately I got stuck for now. When I try debugging the HTTP request block pointing to Audiotarky API endpoint it's only showing an empty array. I checked it from the dev tools, and here's what I got: Screenshot 2021-03-20 at 6 43 23 AM

I'm using Chrome 88 and seems like I'm hitting some new referrer-policy default that Chrome has been enforcing. Or maybe it's an CORS related issue?

This is my current workflow, I'm removing the Graphql endpoint for now since I'm still trying to getting myself comfortable with the editor first.

totorogendut commented 3 years ago

It seems the issue from Audiotarky side. I played around with my API and got a simple table working. (Note: I don't strict CORS from my backend)

EDIT: Audiotarky doesn't seem to set Access-Control-Allow-Origin in their API headers. I think that might be the case why it failed.

EDIT 2: Yup, CORS error. cors error

Sometimes it returns entirely different data although I'm not sure whether it was mock data from Kendraio or some anomaly recreated by 304 response from Audiotarky. How should we proceed from here?

totorogendut commented 3 years ago

I managed to test merging two data source (the original graphql & a simple mock API I created) since Audiotarky API isn't available for now (do we have someone from Audiotarky to contact to regarding this @dahacouk ?)

My current workflows is here.

Also, I hope it's not too late to ask this, but what does DSP1 mean? I'm seeing that a lot in Kendraio.

darrenmothersele commented 3 years ago

I think there's some great feedback/suggestions here that could make their way into new/other issues.

CORS is an issue we have regularly when running as a web app. We don't have the issue if running locally, for example using electron. But it is something we will continue to face when trying to access APIs from the web app.

In the past we have used API proxies hosted on Vercel. But @lukestanley and I have discussed putting in a more general CORS proxy solution.

darrenmothersele commented 3 years ago

DSP1 stands for "Digital Service Provider 1". It's a code name we use for a reference implementation of backend services related to the audio player.

totorogendut commented 3 years ago

Hi @darrenmothersele, thanks for replying!

CORS is an issue we have regularly when running as a web app. We don't have the issue if running locally, for example using electron. But it is something we will continue to face when trying to access APIs from the web app.

In the past we have used API proxies hosted on Vercel. But @lukestanley and I have discussed putting in a more general CORS proxy solution.

Ah, yes, CORS proxy - why I don't think that when I just did exactly the same with mock API I created. For now I'll try making my own CORS proxy for Audiotarky if you haven't got your proxy ready yet.

I think there's some great feedback/suggestions here that could make their way into new/other issues.

I'll try compiling my suggestions for later for a new issue. In fact, I've been gathering a few resources and examples for my suggestions for a while. I'll post it later after I'm more familiar with Kendraio features and Flow blocks. Cheers!

EDIT: I've proxy'd Audiotarky API, and it's working fine now. Now I'm trying to make batch HTTP requests to retrieve artists details (and their songs). I'm looking at Multiplex block since this seems to be the reasonable solution to do it. But the doc for it is almost empty, and now I meet with another roadblock. Is there any examples or more details for this Workflow block? Or should I use another one?

dahacouk commented 3 years ago

Hi @ProgNovel, You are really keeping us on our toes! Well done!

I've proxy'd Audiotarky API, and it's working fine now.

Well done. Thinking about it, we should get Audiotarky to allow our domain to get around the CORS issue. Pinging Simon Metson (@drsm79) of Audiotarky.

Now I'm trying to make batch HTTP requests to retrieve artists details (and their songs). I'm looking at Multiplex block since this seems to be the reasonable solution to do it. But the doc for it is almost empty, and now I meet with another roadblock. Is there any examples or more details for this Workflow block? Or should I use another one?

@darrenmothersele may have a better idea but if you want to see how Multiplex is used then our Coronavirus dashboard may be a good example (https://app.kendra.io/kendraio/coronavirus).

Note to us: it would be great to be able to search Flows by what blocks/items/flows/steps they have nested inside them, eh? A quick way to get example Flow low-code. Wow! I just realised that Flow is low with an F. Wow!

Cheers Daniel

totorogendut commented 3 years ago

Hi @ProgNovel, You are really keeping us on our toes! Well done!

Thanks!

@darrenmothersele may have a better idea but if you want to see how Multiplex is used then our Coronavirus dashboard may be a good example (https://app.kendra.io/kendraio/coronavirus).

Great. I'm going to check that out!

totorogendut commented 3 years ago

It does seem I'm at a point where I need to hack around my way with Kendraio's adapter. I'm downloading https://github.com/kendraio/kendraio-adapter for now, and see if I can plug Audiotarky adapter on it.

totorogendut commented 3 years ago

I managed to iterate the list and fetch relevant data with Batch block instead of Multiplex. But now I'm having trouble on passing those data to HTTP block because it seems only the block's payload and headers supports JMESPath. Is there any workaround for this?

darrenmothersele commented 3 years ago

There is an option to use valueGetters to use JMESPath to build the URL for the HTTP block.

Here's one example with a customised path...

https://github.com/kendraio/kendraio-adapter/blob/1290b6a47fe900c3ff37ee05d1a15d0f3464ca43/adapters/bloomen/configs/viewWork.json#L22

Let me know what you're trying to do and I can try and find a better example.

totorogendut commented 3 years ago

I'm trying to fetch multiple API routes and joined them into a single object, as Audiotarky discoverable API only provide URLs to other APIs. But this is more like I'm trying to get the feel of using Flow blocks and JMESPath properly than trying to build anything with it, since it's my first them using both. I'm not sure if this way even good enough for the task objective.

Actually, I'm having a question on the bounty task right now (regarding playing Audiotarky tracks alongside Kendario's current DSP). Since Audiotarky's API has their own pagination, I think putting them together with the current DSP isn't trivial since to get song list from Audiotarky requires several GET request calls (does Audiotarky has a simpler API to get song list?) and then merge them into an object (hence what I'm doing right now). I previously thought adding Audiotarky tracks like this is what I needed to do. But looking at it again it seems it will be a little difficult without having to write a dedicated backend to map the data first.

So how should I approach this? Should I focus on creating a dedicated player page for Audiotarky instead? Or should I proceed creating a serverless function backend for it?

dahacouk commented 3 years ago

@ProgNovel You are doing great. It seems like we might need to all get together to figure this out. And don't worry about the bounty timescale as we will extend it for you. I will get @darrenmothersele and Simon Metson (@drsm79) to review, and perhaps we'll all get together in a Zoom call to work out ways forward.

totorogendut commented 3 years ago

@ProgNovel You are doing great. It seems like we might need to all get together to figure this out. And don't worry about the bounty timescale as we will extend it for you. I will get @darrenmothersele and Simon Metson (@drsm79) to review, and perhaps we'll all get together in a Zoom call to work out ways forward.

It's assuring to hear that. Looking forward to hear more from Simon too! But as for Zoom call, unfortunately, English is not my native language, and I'm not confident in my spoken communication, so I'm afraid I have to pass the Zoom call.

totorogendut commented 3 years ago

Now I'm trying to build metadata page for Audiotarky, but got stuck reading object keys with JMESPath (currently Audiotarky API provides schema that I think is not JMESPath friendly).

Here's my current workflow...

I'll try to create a serverless function to do process the JSON schema tonight, and see where it's gonna lead me to.

totorogendut commented 3 years ago

I spun up a simple Cloudflare Worker serverless function to process JSON schema coming from Audiotarky, and now finally I can populate Data Grid block with artists' names!

Current Workflow CF Workers repo: https://github.com/ProgNovel/kendraio-audiotarky-api-mock

This is temporary, mostly so that I can play something by connecting the API and Kendraio Workflow. Integrating into player would have to wait until Simon from Audiotarky joining in so we can decide how API is going to be consumed.

drsm79 commented 3 years ago

Hey, nice work :) Sorry about the CORS thing, though looks like you're past that. I could look into adding the right headers if still useful. Nice idea to use CF workers.

Actually, I'm having a question on the bounty task right now (regarding playing Audiotarky tracks alongside Kendario's current DSP). Since Audiotarky's API has their own pagination, I think putting them together with the current DSP isn't trivial since to get song list from Audiotarky requires several GET request calls (does Audiotarky has a simpler API to get song list?) and then merge them into an object (hence what I'm doing right now).

Probably a question for @darrenmothersele or @dahacouk - is the goal to duplicate the contents of the audiotarky API into Kendraio, or be more dynamic?

If its about pushing content to you, we could do this differently, I think.

If its meant to be more dynamic and "discovered" then some form of pagintion makes sense, though I can see how the current set up isn't ideal. I could:

The idea with the API today is that you hit a sort of top level index and from there navigate down to the detail you want, following artist->release->track hierarchy. I could add other routes, if useful...

totorogendut commented 3 years ago

My quickly set up CF Workers only an emergency so that I can do something about the data in Kendraio. The fix coming for Audiotarky definitely is useful!

I'm also still not clear about how I should implement integration to Kendraio. My understanding is that we populate Kendraio player with tracks from Audiotarky, alongside other tracks coming from Kendraio and other future music providers, and having a button where we could fetch detailed info about the current track (and since I received another task, maybe I need to create an additional Workflow strictly to handle metadata for artists and albums from Audiotarky?). I think we should use this opportunity to get ourselves on the same page about how the details and Workflow of Kendraio player + Audiotarky tracks should be.

Also @drsm79, it'll be nice if you take a look on how Kendraio query their current tracks here with Graphql:

query MyQuery {
  tracks {
    display_artist
    display_title
    id
    user_id
    user {
        payment_pointer
    }
  }
}

I think for Kendraio player, we need a route where all of those data available (I propose it'll be tracks route) on top level index quickly so that we won't have to make several API calls every time users opened the player. From Audiotarky, it'll need to be something like this:

{
  "pagination": {
    "current_page": "https://www.audiotarky.com/$/tracks/index.json",
    "page_number": 1,
    "total_pages": 7,
    "previous_page": null,
    "next_page": "https://www.audiotarky.com/$/tracks/page/2/index.json"
  },
  "artists": [
    {
      "display_artist": "A Sol Mechanic x Handbook",
      "display_title": "All Along",
      "url": "https://www.audiotarky.com/$/a-sol-mechanic-x-handbook/mindfulness/all-along/9ff2920a18a1f97929d5e602765d5a1b.audiotarky.mp3",
      "api": "https://www.audiotarky.com/$/artists/a-sol-mechanic-x-handbook/index.json",
      "payment_pointer": "$ilp.uphold.com/xnhGQ7QDrRrw",
    },
    {
      "display_artist": "Actual Bird",
      "display_title": "The Agreer",
      "url": "https://www.audiotarky.com/$/actual-bird/the-agreer/the-agreer/1bb33df2c64bcec6267f20f9157bcd99.audiotarky.mp3",
      "api": "https://www.audiotarky.com/$/artists/actual-bird/index.json",
      "payment_pointer": "$ilp.uphold.com/JUrGh2M7aBK4"
    },
    {
      "display_artist": "Alice Psychic",
      "display_title": "Mountain Landscape [BAM005]",
      "url": "https://www.audiotarky.com/$/alice-psychic/mountain-landscape/mountain-landscape-bam005/26334d99d425c7c185b315a8adcb8213.audiotarky.mp3",
      "api": "https://www.audiotarky.com/$/artists/alice-psychic/index.json",
      "payment_pointer": null
    }
  ]
}

Note that artists element in the API is an array of objects, so that Kendraio player can read it naturally. In addition of query from Kendraio, I think we need Audiotarky to provide mp3 url and API route (which doesn't need to refer as api) in case users want to fetch metadata about the tracks (question: should we also nested payment_pointer in user for the data coming from Audiotarky API?).

As for id and user_id, I think we need to hear more from @dahacouk and @darrenmothersele on how Audiotarky is going to handle that.

dahacouk commented 3 years ago

Sorry about the CORS thing, though looks like you're past that. I could look into adding the right headers if still useful. Nice idea to use CF workers

If I understand the situation correctly... @drsm79 is there a way we could register Kendraio App with Audiotarky so that you would allow our domain and get around the need for a proxy?

dahacouk commented 3 years ago

I'm also still not clear about how I should implement integration to Kendraio. My understanding is that we populate Kendraio player with tracks from Audiotarky, alongside other tracks coming from Kendraio and other future music providers...

Yes, @ProgNovel, this is correct. We want all the tracks available in one player. Once we have that we may look at ways for the user to filter/search/group/page tracks how ever they wish. But first let's get all the tracks in one place. Cheers!

totorogendut commented 3 years ago

Yes, @ProgNovel, this is correct. We want all the tracks available in one player. Once we have that we may look at ways for the user to filter/search/group/page tracks how ever they wish. But first let's get all the tracks in one place. Cheers!

I see. In this case we're likely gonna need tracks route @drsm79.

totorogendut commented 3 years ago

While waiting for Audiotarky API update, I'm making changes to Kendraio player to allow searching for tracks (and I swap title & artist column while I'm at it).

Kendraio player with search feature

What do you think @dahacouk ? Is there something else you want me to add?

dahacouk commented 3 years ago

What do you think @dahacouk ? Is there something else you want me to add?

I like the search @ProgNovel. Hopefully we can get the tracks combined to make it worth having the search feature. 😉

@drsm79 do you know what is needed to improve the API for @ProgNovel?

drsm79 commented 3 years ago

I'll get a bulk tracks API in place over the next few days. Will sort by date added, I think, so you can limit what the calls are pulling back. If this is getting cached somewhere, we could approach this as more of a push than a pull...

totorogendut commented 3 years ago

From my side I can modify my previous CF Workers to enable KV Workers and POST or PUT routes to receive push data. There's also an option to still use pull method but cache API as static JSON files on CDN level so Audiotarky server would only spin for this in case of cache miss.

Example of API layered with CDN cache (pull method): https://audiotarky-pull-api-test.netlify.app/api/artists/index.json (this is Audiotarky API artists route cached on Netlify)

darrenmothersele commented 3 years ago

Is the CF Worker just to support CORS? What functionality is implemented there? Our aim for the App is to access data sources directly, and not require server-side components.

@drsm79, can we do a pull for the data and allow CORS, so that @ProgNovel can do everything from within the App?

totorogendut commented 3 years ago

Is the CF Worker just to support CORS? What functionality is implemented there? Our aim for the App is to access data sources directly, and not require server-side components.

@drsm79, can we do a pull for the data and allow CORS, so that @ProgNovel can do everything from within the App?

Oh, okay. CF Workers I mentioned just a suggestion since @drsm79 requested a cache for push method. If we're going pull directly then there's no need to set up for that (except for the temporary CORS support).

drsm79 commented 3 years ago

Yeah, was asking what the aim is - something dynamic & discoverable or something that’s cached on the kendraio side, which would be a different shape.

If it’s always going to start from an artist, then I’m not sure the “all tracks” api makes sense, especially as the library grows. You’d pull in 100s of tracks to find the 10 by a given performer.

On 25 Mar 2021, at 12:03, ProgNovel @.***> wrote:

 Is the CF Worker just to support CORS? What functionality is implemented there? Our aim for the App is to access data sources directly, and not require server-side components.

@drsm79, can we do a pull for the data and allow CORS, so that @ProgNovel can do everything from within the App?

Oh, okay. CF Workers I mentioned just a suggestion since @drsm79 requested a cache for push method. If we're going pull directly then there's no need to set up for that (except for the temporary CORS support).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

dahacouk commented 3 years ago

Yeah, was asking what the aim is - something dynamic & discoverable or something that’s cached on the kendraio side, which would be a different shape. If it’s always going to start from an artist, then I’m not sure the “all tracks” api makes sense, especially as the library grows.

At this stage @drsm79 we just want anything that can pull tracks in to the app that kind of works. If it pulls in loads of tracks right now then that's OK, it's a good problem to have. 😃 We'll iterate on it as we go forward. But the main aim is to get something that demonstrates the concept and explains how it works and enables loads of devs to say how they would improve it! 😂 Cheers!

totorogendut commented 3 years ago

Maybe it's good to determine how many tracks needed for the current Kendraio player to display so it's easy to decide tracks limit from Audiotarky side.


Will sort by date added, I think, so you can limit what the calls are pulling back.

Just in case; for the new API endpoint, can we make it as simple as possible @drsm79 ? If limiting and sorting through API query by date, using it within Kendraio is quite difficult since it uses JMESPath currently.

What I mean by difficult is processing API endpoint like this:

.../api/tracks/index.json?dateStart=2018-07-01T00:00:00+10:00&dateEnd=2018-12-31T23:59:59+11:00

However endpoint like this is very much viable (which still can be sorted by date under the hood):

.../api/tracks/index.json?limit=20

drsm79 commented 3 years ago

Wasn’t thinking of exposing query params for date, just that the tracks would come back in order of being added, most recent first, and you’d have to page through to get the whole lot.

On 25 Mar 2021, at 17:36, ProgNovel @.***> wrote:

 Maybe it's good to determine how many tracks needed for the current Kendraio player to display so it's easy to decide tracks limit from Audiotarky side.

Will sort by date added, I think, so you can limit what the calls are pulling back.

As for the new API endpoint, can we make it as simple as possible @drsm79 ? If limiting and sorting through API query by date, using it within Kendraio is quite difficult since it uses JMESPath currently.

What I mean by difficult is processing API endpoint like this:

.../api/tracks/index.json?dateStart=2018-07-01T00:00:00+10:00&dateEnd=2018-12-31T23:59:59+11:00

However endpoint like this is very much viable (which still can be sorted by date under the hood):

.../api/tracks/index.json?limit=20

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

dahacouk commented 3 years ago

@drsm79 How about, just to get us going, giving us 12 tracks and some of those from the same artists, with and without payment pointers? Then we've got some criteria to play with locally in the app. After that we can look at search/discovery. We haven't thought or built search/discovery into the player yet so that would require us to all think a bit more about it. But at least if we got 12 tracks now we could continue development on the bounty and in parallel think about how the blazes we do search and discovery. 😉 Is this a good idea? Just to keep things rolling?

drsm79 commented 3 years ago

First pass of an all tracks API is up on https://www.audiotarky.com/$/tracks/index.json. The pagination object tells you how to move forward/backward through the data, the tracks list is a list of tracks... ;) tracks are grouped by artist & album, both sorted alphabetically. Each page holds 25 tracks.

drsm79 commented 3 years ago

CORS will have to wait till tomorrow or the weekend but hopefully you're unblocked @ProgNovel :)

totorogendut commented 3 years ago

First pass of an all tracks API is up on https://www.audiotarky.com/$/tracks/index.json. The pagination object tells you how to move forward/backward through the data, the tracks list is a list of tracks... ;) tracks are grouped by artist & album, both sorted alphabetically. Each page holds 25 tracks.

CORS will have to wait till tomorrow or the weekend but hopefully you're unblocked @ProgNovel :)

Cool! It's looking fine. I still have CF Workers to bypass CORS so please take your time!

Oh, I'm very low on mobile data for today. I'll try making updates for Kendraio player before my internet data used up but if I couldn't then it's likely I'd have to post the new update for Kendraio player tomorrow.

totorogendut commented 3 years ago

I've managed to populate the player with Audiotarky tracks for now, but apparently the mp3 files blocked by CORS too. I haven't managed to whitelist the mp3 files for now, I'll try to fix it before my internet goes down.

Kendraio player

drsm79 commented 3 years ago

Very cool :)

On 26 Mar 2021, at 06:25, ProgNovel @.***> wrote:

 I've managed to populate the player with Audiotarky tracks for now, but apparently the mp3 files blocked by CORS too. I haven't managed to whitelist the mp3 files for now, I'll try to fix it before my internet goes down.

Kendraio player

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

drsm79 commented 3 years ago

CORS header is now set & it looks like the mp3 is getting retrieved

totorogendut commented 3 years ago

CORS header is now set & it looks like the mp3 is getting retrieved

Nice @drsm79 :D !

Any idea on what I should do next @dahacouk ?

totorogendut commented 3 years ago

Player update

Player here

Unfortunately from here I found that I can't play songs from Audiotarky properly. It instead play weird 4 seconds Text-To-Speech generated voice that I'm unable to follow what it means, even though the actual mp3 has been downloaded by the app (checked the dev tools that the mp3 files indeed was already downloaded). The only problem I can think of is that I don't have Coil subscription (but strangely Kendraio player demo tracks played smoothly even without logged in to Coil) - or, if the player currently is problematic, is that because I don't pass data for analyticsItemUUID and analyticsRecipientID for Audiotarky tracks (since I thought it was only for analytics and not required to play the mp3 files at the current stage of the development).

Here's the debug screenshot of the player: Screenshot 2021-03-28 at 2 15 47 AM

drsm79 commented 3 years ago

The robot voice is intentional - you get that if you’ve not made a session, and had a verified coil payment. I can share some code to create that session later today.

On 27 Mar 2021, at 18:17, ProgNovel @.***> wrote:

 Player update

Add pagination for tracks (max 10 songs before tracks deferred to the next pages) Search form now can also filter artist instead of only track title Player here

Unfortunately from here I found that I can't play songs from Audiotarky properly. It instead play weird 4 seconds Text-To-Speech generated voice that I'm unable to follow what it means, even though the actual mp3 has been downloaded by the app (checked the dev tools that the mp3 files indeed was already downloaded). The only problem I can think of is that I don't have Coil subscription (but strangely Kendraio player demo tracks played smoothly) - or, if the player currently is problematic, is that because I don't pass data for analyticsItemUUID and analyticsRecipientID for Audiotarky tracks (since I thought it was only for analytics and not required to play the mp3 files at the current stage of the development).

Here's the debug screenshot of the player:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

dahacouk commented 3 years ago

The robot voice is intentional

Nice trick! 😃

you get that if you’ve not made a session, and had a verified coil payment.

That's interesting. We may need to think about how to integrate this 'check' in Kendraio Player. At the moment the player checks for the Coil browser extension and if the extension is not there an option to log into the Coil API is given. But I don't think we have actually checked that there is a "verified coil payment". It seems that this is a flag that the player would need to send to the DSP (in this case Audiotarky) to inform that payments are actually being made. This sounds 'fun' and fraught with gotchas! 😉

I feel we may need to document all the different options for Kendraio Player and the DSPs, so we can see all this a bit more clearly. Because different DSPs may have different policies to interact with different scenarios – as in, deny access to content, or prepend messages to content (as Audiotarky does), or just let them have it.

@drsm79 I'm also curious what a "session" actually means. Does the listener need to log into Audiotarky? That'll be fun!

I can share some code to create that session later today.

I guess this would help understand the flow of this particular use case, yes.

Cheers!

totorogendut commented 3 years ago

The robot voice is intentional - you get that if you’ve not made a session, and had a verified coil payment. I can share some code to create that session later today.

So that is the case. I really thought this is something Kendraio team had made and I ended up spent hours looking for a workaround for nothing 😂

I don't have Coil subscription at the moment. Can anyone tell me the player is working fine for Audiotarky tracks with Coil session enabled?

I can share some code to create that session later today.

I think I remember reading your post on WM Community about Python WM verifying server. Does this have anything to do with that?

totorogendut commented 3 years ago

I feel we may need to document all the different options for Kendraio Player and the DSPs, so we can see all this a bit more clearly. Because different DSPs may have different policies to interact with different scenarios – as in, deny access to content, or prepend messages to content (as Audiotarky does), or just let them have it.

For now, I'm thinking of making a small banner of text above the player waveform for Audiotarky that's telling users to sign in with paid Coil account when selecting a track from Audiotarky. Do you have any better suggestions @dahacouk @drsm79 ?

totorogendut commented 3 years ago

Is there a documentation to pass data on launching Workflow on different adapter @darrenmothersele ?

The idea is to bring user to a metadata page from Kendraio player directly from the tracks grid, but I failed to pass data to context on the different adapter/workflow.

Current player