Sinethemba Gayiza
Sinethemba Gayiza

Reputation: 1

How to play radio in background of WordPress website?

I have embedded an online radio station from Radio.net, my brief is to develop a Web-App so I am building this on a WordPress website environment using the embed widget.

Radio.net has provided this embed code:

<script> (function(d, s) {
    if (!window.rel) {
        s = d.createElement("script");
        s.type = "text/javascript";
        s.async = true;
        s.id = "radio-de-embedded";
        s.src = "//www.radio.net/inc/microsite/js/full.js";
        d.getElementsByTagName("head")[0].appendChild(s);
        window.rel = true;
    }
}(document)); < /script><div class="ng-app-embedded"><div ui-view class="microsite embedded-radio-player" data-playerwidth="340px" data-playertype="web_embedded" data-playstation="keithngesi" data-autoplay="true" data-apikey="abcdef..."></div>
  1. How can I achieve an instance where the radio play keeps playing whilst the website or Web-App is still active or online?

  2. The Radio player keeps playing when a user switches pages?

Upvotes: 0

Views: 423

Answers (2)

Jean-Marc K
Jean-Marc K

Reputation: 1

<script>
(function(d, s) {
    if (!window.rel) {
        s = d.createElement("script");
        s.type = "text/javascript";
        s.async = true;
        s.id = "radio-de-embedded";
        s.src = "https://www.radio.fr/inc/microsite/js/full.js";
        d.getElementsByTagName("head")[0].appendChild(s);
        window.rel = true;
    }
}(document));
</script>
    <div class="ng-app-embedded"><div ui-view class="microsite embedded-radio-player" data-playerwidth="340px" data-playertype="web_embedded" data-playstation="lautfm-1000schlager" data-autoplay="true" data-apikey="df04ff67dd3339a6fc19c9b8be164d5b5245ae93"></div></div><noscript><a href="https://www.radio.fr/s/lautfm-1000schlager" target="_blank">1000SCHLAGER sur radio.fr</a></noscript>

Upvotes: 0

Emmanuel
Emmanuel

Reputation: 447

You want to build a Single page application

Here is a Jump start

Upvotes: 0

Related Questions