Coder Social home page Coder Social logo

jhackett1 / smoke-mixcloud-integrator Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 676 KB

Wordpress plugin using AngularJS to display recent podcasts and allow playback.

Home Page: http://smoke.media/radio

CSS 96.00% JavaScript 2.67% PHP 1.33%
mixcloud angularjs wordpress

smoke-mixcloud-integrator's Introduction

Smoke Mixcloud Integrator

Wordpress plugin implementing a simple AngularJS application to display podcasts and allow them to be played in an embedded player.

Use it with the shortcode [mixcloud-integrator].

The plugin uses the Mixcloud API to list shows published by a given account, and makes a second call to retrieve the embed player HTML for a particular podcast when the user tries to play one.

smoke-mixcloud-integrator's People

Watchers

 avatar  avatar

Forkers

hueney

smoke-mixcloud-integrator's Issues

Possible to define feedEndpoint dynamically?

Hi @jhackett1
thank you for this elegant solution!
I am turning to you for guidance

I have a custom post type "show" which has a custom field "show_archive_url". This field holds the URL to the show's mixcloud playlist.

I tried to output that field as a value of a hidden field and then running your shortcode in a single.php file like so:
<input id="show-archive-url" type="hidden" value="<?php echo $show_archive_url; ?>">
<?php echo do_shortcode( '[mixcloud-integrator]' ); ?>

Then, I tried to read that value and insert it as the feedEndpoint in services.js like so:
document.addEventListener("DOMContentLoaded", function() {
var archiveUrl = document.getElementById('show-archive-url').value;
});
...
const feedEndpoint = archiveUrl;

As a result, I get variable undefined in console.
I am out of ideas for how else I could approach this. Could you point me to the right direction?

Best regards
Rasti

const feedEndpoint = "https://api.mixcloud.com/smokeradio/cloudcasts/";

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.